dan-snelson / dialog-scripts

Scripts with leverage Bart Reardon's swiftDialog
MIT License
110 stars 35 forks source link

Jamf CLI in Action Display Message/Display-Message-via-Dialog.bash #58

Closed kMikaZu closed 4 weeks ago

kMikaZu commented 4 months ago

Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.

Is your feature request related to a problem? Please describe. When I run the Display Message/Display-Message-via-Dialog.bash script in a Jamf Pro Environment, I cannot execute a CLI command into variable $11. For example, if I want to execute jamf policy -event triggername -verbose, the log returns:

The file /Users/<user-folder>/sudo jamf policy -event rollout-kandji -verbose does not exist.

Describe the solution you'd like Support for the CLI would be much appreciated.

Describe alternatives you've considered Tried putting the command between "" but that doesn't work.

Additional context Add any other context or screenshots about the feature request here.

dan-snelson commented 4 weeks ago

Correct, @kMikaZu; the open command is being executed as the currently logged-in user: https://github.com/dan-snelson/dialog-scripts/blob/main/Display%20Message/Display-Message-via-Dialog.bash#L309