refactor: allow setting more options when changing permissions on a file

Rather than hardcoding paths, just allow them to be options.
This commit is contained in:
Jose Diaz-Gonzalez
2024-01-30 07:31:02 -05:00
parent 6622de5998
commit a277c5da1b
5 changed files with 88 additions and 50 deletions

View File

@@ -84,11 +84,10 @@ func TriggerInstall() error {
return err
}
if err := common.SetPermissions(logDirectory, 0755); err != nil {
return err
}
return nil
return common.SetPermissions(common.SetPermissionInput{
Filename: logDirectory,
Mode: os.FileMode(0755),
})
}
// TriggerLogsGetProperty writes the logs key to stdout for a given app container