You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Save does not return an error when the file does not exist #13
Just tried to reproduce the error. Apparently, the directory must exist. Tried the following in an empty directory (augeas 1.8, Debian/stretch chroot):
$ augtool --root .
augtool> set /augeas/load/Xmgmt/lens Sshd.lns
augtool> set /augeas/load/Xmgmt/incl /tmp/foo/bar
augtool> set /files/tmp/foo/bar/X11Forwarding no
augtool> save
error: Failed to execute command
saving failed (run 'errors' for details)
augtool> errors
Error in /tmp/foo/bar (mk_augtemp)
No such file or directory
I can confirm that your test program produces no error -- this is a bug in the library, indeed.
After creating the directory and repeating the procedure everything works fine from augtool.
augtool tells us to get the errors through a dedicated command which prints out the messages from the /augeas//error tree... go-augeas should probably return a generic error in this case.
Activity
Add a test to show dominikh/go-augeas#13
hillu commentedon May 11, 2017
Just tried to reproduce the error. Apparently, the directory must exist. Tried the following in an empty directory (augeas 1.8, Debian/stretch chroot):
I can confirm that your test program produces no error -- this is a bug in the library, indeed.
After creating the directory and repeating the procedure everything works fine from augtool.
hillu commentedon May 11, 2017
Digging further... a simple C test program to reproduce this issue behaves correctly in the sense that -1 is returned.
However, the
aug_error_*functions return nothing sensible:augtooltells us to get the errors through a dedicated command which prints out the messages from the/augeas//errortree...go-augeasshould probably return a generic error in this case.