fsx: Remove environment references

This commit removes the reference to the environment from the fsx
package.
This commit is contained in:
Tom Wiesing 2023-03-02 11:47:11 +01:00
parent 5a43ecfaeb
commit 3263920d6b
No known key found for this signature in database
25 changed files with 167 additions and 183 deletions

View file

@ -10,7 +10,7 @@ func ValidateFile(env environment.Environment, path *string, dflt string) error
if *path == "" {
*path = dflt
}
if !fsx.IsFile(env, *path) {
if !fsx.IsFile(*path) {
return errors.Errorf("%q does not exist or is not a file", *path)
}
return nil
@ -20,7 +20,7 @@ func ValidateDirectory(env environment.Environment, path *string, dflt string) e
if *path == "" {
*path = dflt
}
if !fsx.IsDirectory(env, *path) {
if !fsx.IsDirectory(*path) {
return errors.Errorf("%q does not exist or is not a directory", *path)
}
return nil