Jump to content

davidrd85

Member
  • Posts

    8
  • Joined

  • Last visited

Everything posted by davidrd85

  1. No clearly, but I'm a noob at this 🙄 But the workflow might be broken altogether. Now when the workflow list the unmounted disks, it just lists two selections that writes: "Not" [16:04:03.704] Logging Started... [16:04:08.273] Disk Utilities[Script Filter] Queuing argument '(null)' [16:04:09.190] Disk Utilities[Script Filter] Script with argv '(null)' finished [16:04:09.193] Disk Utilities[Script Filter] {"items":[{ "title": "Not", "subtitle": "Select to mount", "arg": "/dev/disk4" },{ "title": "Not", "subtitle": "Select to mount", "arg": "/dev/disk6" },]} The unmount command just fails [16:08:02.337] Disk Utilities[Script Filter] Processing complete [16:08:02.338] Disk Utilities[Script Filter] Passing output 'Seagate' to Run Script [16:08:02.386] ERROR: Disk Utilities[Run Script] Unmount failed for Seagate Thank you for your generous time. But this script was not really a mount/unmount solution.
  2. Thank you. But that sadly did not help. I even tried a restart just to make sure. Still same ERROR [15:40:54.784] Logging Started... [15:40:57.189] Disk Utilities[Script Filter] Queuing argument '(null)' [15:40:57.558] Disk Utilities[Script Filter] Script with argv '(null)' finished [15:40:57.560] STDERR: Disk Utilities[Script Filter] /Users/david/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/CDCC52B7-F260-4227-B60C-275901821708: line 18: jq: command not found [15:40:57.561] Disk Utilities[Script Filter] {"items":[,]} [15:40:57.562] ERROR: Disk Utilities[Script Filter] JSON error: Invalid value around line 1, column 10. in JSON: {"items":[,]}
  3. I did install Homebrew for Apple silicon. I also tried to do what you explained in your post, but I have no real scripting knowledge. Would you please write the corrected script? #!/usr/bin/env bash devices=($(diskutil list external physical | grep "/dev/" | cut -d' ' -f1)) for device in ${devices[@]}; do if [[ ${device} != *"disk2"* && ${device} != *"disk5"* ]];then mounted=$(mount | grep $device | wc -l) if [[ $mounted -eq 0 ]];then max_partition=$(($(diskutil list $device | wc -l)-3)) vol_name=$(diskutil info ${device}s${max_partition} | grep "Volume Name" | xargs echo -n | cut -d' ' -f3) JSON_STRING=$(/usr/local/opt/jq/bin/jq -n \ --arg title "$vol_name" \ --arg subtitle "Select to mount" \ --arg arg "$device" \ '$ARGS.named') JSON+="$JSON_STRING," fi fi done echo "{\"items\":[$JSON]}"
  4. Thank you for the detailed explanation. I'm on a M1 Mac though. Is Homebrew not yet available for Apple silicon?
  5. Thank you so much. I didn't know about that feature. This is what I got: [14:20:16.098] Logging Started... [14:20:20.841] Disk Utilities[Script Filter] Queuing argument '(null)' [14:20:21.230] Disk Utilities[Script Filter] Script with argv '(null)' finished [14:20:21.232] STDERR: Disk Utilities[Script Filter] /Users/david/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/E7FEF73A-A0F8-4D15-B92D-D36DADCD0903: line 18: /usr/local/opt/jq/bin/jq: No such file or directory [14:20:21.233] Disk Utilities[Script Filter] {"items":[,]} [14:20:21.234] ERROR: Disk Utilities[Script Filter] JSON error: Invalid value around line 1, column 10. in JSON: {"items":[,]} Do I need to install some other script?
  6. Appreciate the workflow, this is just what I want. I can not get it to work though. Every time time I try to list the volumes it just "blanks out" and shows nothing. Do you know if Apple changed something in the most resent version of Monterey? Thanks
×
×
  • Create New...