setup-your-mac / Setup-Your-Mac

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
https://snelson.us/sym
MIT License
231 stars 52 forks source link

Question about line 323 #123

Closed donmontalvo closed 7 months ago

donmontalvo commented 7 months ago

Can you remove the redundant back slash from line 323 in "Setup-Your-Mac-via-Dialog.bash"?

No impact, but it's the only one of several similar lines that has the unnecessary back slash.

I'll be in purgatory if you need me. :)

TIA

dan-snelson commented 7 months ago

Thanks for the feedback, @donmontalvo.

Does Line 323 work for you sans back slashes?

bartreardon commented 7 months ago

the backslash is necessary though to escape the " characters and ${outdatedOsAction} is contained correctly.

"/usr/bin/open \"${outdatedOsAction}\""

There's four "'s there. two open and two closed. The inner two are appropriately escaped using \

Apart from that, I can't see what the issue is. Is the script not running because of these or is it a personal preference? If the latter, there's nothing stopping anyone editing their copy of the script as they see fit.

donmontalvo commented 7 months ago

My apologies for any confusion, the line I meant to point to contains:

dialogApp="/Library/Application\ Support/Dialog/Dialog.app/Contents/MacOS/Dialog"

Note the escaped space within the quoted path. It may have been fixed, since my colleague told me we are a couple versions behind. As mentioned, no impact.

dan-snelson commented 7 months ago

Sorry for any Dan-induced confusion, @donmontalvo.

Let's first ensure we're looking at the same version: Setup-Your-Mac-via-Dialog.bash

donmontalvo commented 7 months ago

We're a couple versions behind. I must have been on an old page. The line exists in the script version we're using. The string I mentioned existed in the past. Here's a screenshot from an old post.

DonM_ 2023-11-14 at 05 44 05

donmontalvo commented 7 months ago

This can be closed, the new script doesn’t have it.

bartreardon commented 7 months ago

Ah, that makes sense then. I was confused for a bit there 🙂