Correctly detect not exist error

This commit is contained in:
Dane Everitt 2020-09-07 15:57:11 -07:00
parent 891e5baa27
commit fff9a89ebb
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -163,7 +163,7 @@ func (f *ConfigurationFile) Parse(path string, internal bool) error {
break
}
if os.IsNotExist(err) {
if errors.Is(err, os.ErrNotExist) {
// File doesn't exist, we tried creating it, and same error is returned? Pretty
// sure this pathway is impossible, but if not, abort here.
if internal {