Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updates file_utils#FileExists to check for err (#191) #195

Merged
merged 5 commits into from Sep 13, 2022

Conversation

Gowiem
Copy link
Member

@Gowiem Gowiem commented Sep 9, 2022

what

  • Fixes an issue where ATMOS_CLI_CONFIG_PATH points to a non directory and results in a panic.

why

  • We shouldn't panic. All is okay. This provides proper messaging and gracefully fails.
  • The error in question here that was getting skipped over by os.IsNotExist(err) was the following:
    • stat /usr/local/etc/atmos/atmos.yaml/atmos.yaml: not a directory

references

@Gowiem Gowiem requested a review from a team as a code owner September 9, 2022 18:32
@Gowiem Gowiem self-assigned this Sep 9, 2022
@Gowiem Gowiem requested a review from a team as a code owner September 9, 2022 18:32
pkg/config/config.go Outdated Show resolved Hide resolved
@nitrocode nitrocode added the patch A minor, backward compatible change label Sep 11, 2022
Gowiem and others added 2 commits September 11, 2022 17:34
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @Gowiem

@aknysh aknysh merged commit e36d548 into master Sep 13, 2022
@aknysh aknysh deleted the fix/file-exists-bug branch September 13, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting ATMOS_CLI_CONFIG_PATH to a file path and not a directory path causes a panic
3 participants