Skip to content

Commit fe7e262

Browse files
committed
Clarify error message when host drive path is inaccessible
Example with firectl: $ ./firectl --kernel=./vmlinux WARN[0000] Failed handler "validate.Cfg": failed to stat host path, "": stat : no such file or directory FATA[0000] Failed to start machine: failed to stat host path, "": stat : no such file or directory As you can see it's rather impossible for the user to tell what exactly is missing. Signed-off-by: Nikolay Edigaryev <[email protected]>
1 parent ba43a95 commit fe7e262

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

machine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (cfg *Config) Validate() error {
177177
if BoolValue(drive.IsRootDevice) {
178178
rootPath := StringValue(drive.PathOnHost)
179179
if _, err := os.Stat(rootPath); err != nil {
180-
return fmt.Errorf("failed to stat host path, %q: %v", rootPath, err)
180+
return fmt.Errorf("failed to stat host drive path, %q: %v", rootPath, err)
181181
}
182182

183183
break

0 commit comments

Comments
 (0)