microsoft / shell-intune-samples

Sample shell scripts for Intune admins.
MIT License
637 stars 213 forks source link

InstallNudge.zsh updateCheck and installPKG functions issue #68

Closed rnicolson closed 1 year ago

rnicolson commented 1 year ago

Then current version of the InstallNudge.zsh script has an error in the updateCheck function. The path it is checking is /Applications/$app when it should be checking /Applications/Utilities/$app. This is the same issue in the installPKG, installDMG, and installZIP functions. Unless the intention of this new version of the script is to change the location Nudge is normally installed to.

This issue seems to be present in the InstallNudge.sh file as well.

An example of where this is occurring is lines 462-465 of the zsh file. Even if Nudge it already installed it will not be removing the existing version.

Remove existing files if present

if [[ -d "/Applications/$app" ]]; then
    rm -rf "/Applications/$app"
fi
theneiljohnson commented 1 year ago

This is now fixed - thanks.