Problem: Tests used syscall.Umask(0000) which could leave your shell creating
files with 777 permissions if interrupted.
Solution: Instead of changing umask, tests now detect the current umask and
calculate expected permissions after it's applied.
Result: Same test coverage, but safe from system-wide side effects.
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
Use defer outFile.Close() to avoid multiple close calls and ensure proper resource cleanup
Co-authored-by: Andrew Block <andy.block@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Runtime abstraction to encapsulate subprocess code and enable future runtimes
Also fix race condition in TestPrepareCommandExtraArgs by replacing the shared variable modification with a local copy
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Remove commented out code
Co-authored-by: Joe Julian <me@joejulian.name>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Check test failure string
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
---------
Signed-off-by: Scott Rigby <scott@r6by.com>
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Co-authored-by: Joe Julian <me@joejulian.name>
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>