Skip to content

ssh: fix DownloadDir empty response check#147

Merged
nywilken merged 1 commit intomainfrom
fix_download_error_check
Jan 11, 2023
Merged

ssh: fix DownloadDir empty response check#147
nywilken merged 1 commit intomainfrom
fix_download_error_check

Conversation

@lbajolet-hashicorp
Copy link
Copy Markdown
Contributor

We used to check if a ssh server returns an empty payload with a len(fi) < 0, which can never succeed as len never returns negative values.

This commit changes the condition to an == instead.

We used to check if a ssh server returns an empty payload with a len(fi)
< 0, which can never succeed as len never returns negative values.

This commit changes the condition to an == instead.
@lbajolet-hashicorp lbajolet-hashicorp requested a review from a team as a code owner January 10, 2023 15:39
Copy link
Copy Markdown
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Looks good to me.

@nywilken nywilken added the bug Something isn't working label Jan 11, 2023
@nywilken nywilken merged commit 5012fd5 into main Jan 11, 2023
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix_download_error_check branch January 11, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants