@@ -286,7 +286,11 @@ function CreateWriteableDir () {
286
286
if [ ! -d " ${path} " ]; then
287
287
write " Creating ${desc} folder..." $color_primary
288
288
# sudo
289
- mkdir -p " ${path} " > /dev/null 2> /dev/null
289
+ if [ " ${verbosity} " = " loud" ]; then
290
+ mkdir -p " ${path} "
291
+ else
292
+ mkdir -p " ${path} " > /dev/null 2> /dev/null
293
+ fi
290
294
if [ $? -eq 0 ]; then
291
295
writeLine " done" $color_success
292
296
else
@@ -1701,9 +1705,9 @@ function installRequiredPythonPackages () {
1701
1705
# writeLine "${venvPythonCmdPath} -m pip install $pipFlags -r ${requirementsPath} --target ${packagesDirPath}" $color_info
1702
1706
write ' Installing Packages into Virtual Environment...' $color_primary
1703
1707
if [ " ${verbosity} " = " loud" ]; then
1704
- " $venvPythonCmdPath " -m pip install $pipFlags -r " ${requirementsPath} " --target ${packagesDirPath}
1708
+ " $venvPythonCmdPath " -m pip install $pipFlags -r " ${requirementsPath} " --target " ${packagesDirPath} "
1705
1709
else
1706
- " $venvPythonCmdPath " -m pip install $pipFlags -r " ${requirementsPath} " --target ${packagesDirPath} > /dev/null &
1710
+ " $venvPythonCmdPath " -m pip install $pipFlags -r " ${requirementsPath} " --target " ${packagesDirPath} " > /dev/null &
1707
1711
spin $!
1708
1712
fi
1709
1713
writeLine ' Success' $color_success
@@ -1777,9 +1781,9 @@ function installRequiredPythonPackages () {
1777
1781
if [ " ${os} " = " linux" ] || [ " ${os} " = " macos" ]; then
1778
1782
# No, I don't know why eval is needed in Linux but not elsewhere
1779
1783
if [ " ${verbosity} " = " loud" ]; then
1780
- eval " ${venvPythonCmdPath} " -m pip install " ${package_name} " --target " ${packagesDirPath} " ${currentOption} ${pipFlags}
1784
+ eval " \ $ {venvPythonCmdPath}" -m pip install " ${package_name} " --target " \ $ {packagesDirPath}" ${currentOption} ${pipFlags}
1781
1785
else
1782
- eval " ${venvPythonCmdPath} " -m pip install " ${package_name} " --target " ${packagesDirPath} " ${currentOption} ${pipFlags} > /dev/null 2> /dev/null &
1786
+ eval " \ $ {venvPythonCmdPath}" -m pip install " ${package_name} " --target " \ $ {packagesDirPath}" ${currentOption} ${pipFlags} > /dev/null 2> /dev/null &
1783
1787
spin $!
1784
1788
fi
1785
1789
else
@@ -2193,9 +2197,9 @@ function getValueFromModuleSettingsFile () {
2193
2197
local moduleId=$2
2194
2198
local property=$3
2195
2199
2196
- # if [ "$verbosity" = "loud" ]; then
2197
- # echo "Searching for '${property}' in a suitable modulesettings.json file in ${moduleDirPath}" >&3
2198
- # fi
2200
+ if [ " $verbosity " = " loud" ] && [ " $debug_json_parse " == " true " ]; then
2201
+ echo " Searching for '${property} ' in a suitable modulesettings.json file in ${moduleDirPath} " >&3
2202
+ fi
2199
2203
2200
2204
# Module settings files are loaded in this order. Each file will overwrite (but not delete)
2201
2205
# settings of the previous file. Becuase of this, we're going to search the files in REVERSE
@@ -2250,7 +2254,7 @@ function getValueFromModuleSettingsFile () {
2250
2254
if [ " ${moduleSettingValue} " != " " ]; then settings_file_used=" modulesettings.json" ; fi
2251
2255
fi
2252
2256
2253
- if [ false ] && [ " $verbosity " = " loud " ]; then
2257
+ if [ " $verbosity " = " loud " ] && [ " $debug_json_parse " == " true " ]; then
2254
2258
if [ " ${moduleSettingValue} " = " " ]; then
2255
2259
echo " Cannot find ${moduleId} .${property} in modulesettings in ${moduleDirPath} " >&3
2256
2260
else
@@ -2303,7 +2307,10 @@ function getValueFromModuleSettings () {
2303
2307
key=$" .Modules.${moduleId} .${property} "
2304
2308
fi
2305
2309
2306
- # echo jsonFile is $json_file >&3
2310
+ if [ " $verbosity " = " loud" ] && [ " $debug_json_parse " == " true" ]; then
2311
+ echo jsonFile is $json_file >&3
2312
+ echo parse_mode is $parse_mode >&3
2313
+ fi
2307
2314
2308
2315
if [ -f " $json_file " ]; then
2309
2316
if [ " $parse_mode " = " jq" ]; then
@@ -2332,9 +2339,7 @@ function getValueFromModuleSettings () {
2332
2339
2333
2340
# Do the extraction
2334
2341
jsonValue=$( echo " $file_contents " | jq -r " $key " )
2335
- # echo "jsonValue = $jsonValue" >&3
2336
- # quit
2337
-
2342
+
2338
2343
elif [ " $parse_mode " = " parsejson" ]; then
2339
2344
2340
2345
# Let's back in this huge earth mover to plant my flower pots. Even
@@ -2366,9 +2371,10 @@ function getValueFromModuleSettings () {
2366
2371
# Really??
2367
2372
if [ " $jsonValue " == " null" ]; then jsonValue=" " ; fi
2368
2373
2369
- # debug
2370
- # if [ "$verbosity" = "loud" ]; then echo "${key} = $jsonValue" >&3; fi
2371
-
2374
+ if [ " $verbosity " = " loud" ] && [ " $debug_json_parse " == " true" ]; then
2375
+ echo " ${key} = $jsonValue " >&3 ;
2376
+ fi
2377
+
2372
2378
echo $jsonValue
2373
2379
}
2374
2380
@@ -2516,23 +2522,34 @@ function displayMacOSDirCreatePermissionError () {
2516
2522
2517
2523
haveDisplayedMacOSDirCreatePermissionError=true
2518
2524
2525
+ writeLine ' '
2519
2526
writeLine ' '
2520
2527
writeLine ' We may be able to suggest something:' $color_info
2521
2528
2522
- # Note that will appear as the Apple symbol on macOS, but probably not on Windows or Linux
2523
- writeLine ' 1. Pull down the Apple menu and choose "System Preferences"'
2524
- writeLine ' 2. Choose “Security & Privacy” control panel'
2525
- writeLine ' 3. Now select the “Privacy” tab, then from the left-side menu select'
2526
- writeLine ' “Full Disk Access”'
2527
- writeLine ' 4. Click the lock icon in the lower left corner of the preference '
2528
- writeLine ' panel and authenticate with an admin level login'
2529
- writeLine ' 5. Now click the [+] plus button so we can full disk access to Terminal'
2530
- writeLine " 6. Navigate to the /Applications/Utilities/ folder and choose 'Terminal'"
2531
- writeLine ' to grant Terminal Full Disk Access privileges'
2532
- writeLine ' 7. Relaunch Terminal, the “Operation not permitted” error messages should'
2533
- writeLine ' be gone'
2534
- writeLine
2535
- writeLine ' Thanks to https://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/'
2529
+ if [ " $os_name " = " Sonoma" ]; then # macOS 14 / Kernal 23
2530
+ # Note that will appear as the Apple symbol on macOS, but probably not on Windows or Linux
2531
+ writeLine ' 1. Pull down the Apple menu and choose "System Settings"'
2532
+ writeLine ' 2. Choose “Privacy & Security"'
2533
+ writeLine ' 3. Scroll down to “Full Disk Access” and click the right arrow >'
2534
+ writeLine ' 4. Click the [+] plus button, and in the popup, navigate to the'
2535
+ writeLine ' /Applications/Utilities/ folder and choose "Terminal"'
2536
+ writeLine ' 5. Relaunch Terminal. The “Operation not permitted” error messages should'
2537
+ writeLine ' be gone'
2538
+ else
2539
+ writeLine ' 1. Pull down the Apple menu and choose "System Preferences"'
2540
+ writeLine ' 2. Choose “Security & Privacy” control panel'
2541
+ writeLine ' 3. Now select the “Privacy” tab, then from the left-side menu select'
2542
+ writeLine ' “Full Disk Access”'
2543
+ writeLine ' 4. Click the lock icon in the lower left corner of the preference '
2544
+ writeLine ' panel and authenticate with an admin level login'
2545
+ writeLine ' 5. Now click the [+] plus button so we can full disk access to Terminal'
2546
+ writeLine " 6. Navigate to the /Applications/Utilities/ folder and choose 'Terminal'"
2547
+ writeLine ' to grant Terminal Full Disk Access privileges'
2548
+ writeLine ' 7. Relaunch Terminal, the “Operation not permitted” error messages should'
2549
+ writeLine ' be gone'
2550
+ fi
2551
+
2552
+ writeLine ' '
2536
2553
fi
2537
2554
2538
2555
# quit 8 # unable to create file or directory
0 commit comments