vitor Posted April 26 Share Posted April 26 Usage Mount disk partitions via the mount keyword. Unmount with the unmount keyword. ⤓ Install on the Alfred Gallery | Source Link to comment
vitor Posted April 26 Author Share Posted April 26 When reporting issues, please include your exact installed versions of:The Workflow.Alfred.macOS.In addition to:The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better. Link to comment
BigLaser Posted June 14 Share Posted June 14 Lovely tool, thanks for sharing. Why did you package a Unix Executable with it? Why not use existing terminal commands? I'm curious how all of this works, and your mindset for doing it this way. On 4/26/2024 at 10:03 AM, vitor said: Usage Mount disk partitions via the mount keyword. Unmount with the unmount keyword. ⤓ Install on the Alfred Gallery | Source Link to comment
vitor Posted June 14 Author Share Posted June 14 1 hour ago, BigLaser said: Lovely tool, thanks for sharing. Thank you for the kind words. 1 hour ago, BigLaser said: Why did you package a Unix Executable with it? Why not use existing terminal commands? It’s not a Unix executable, it’s a regular osascript script (try opening it in a text editor). It’s just that it does not have an extension. It’s not weird for me to port code to other languages, so I prefer to not tie functionality to file types. It is using regular system commands but they’re not as straightforward to interpret as it seems on first sight. Link to comment
BigLaser Posted June 14 Share Posted June 14 I've been diving into automations, Alfred scripting, etc... so I have lots of questions. Thanks for fielding my curiosity. 9 hours ago, vitor said: It’s not a Unix executable, it’s a regular osascript script (try opening it in a text editor) I see! this is an osascript Javascript (JSX) and it's being invoked as an external script. There are so many design decisions here, I could ask endless questions. Why use JSX instead of AppleScript? I presume because of personal preference? Familiarity? Does JSX do everything AS can? I've been using AppleScript - which I don't love - because I learned it a while ago. Why use mountdisk as an external script? Does having it as a file make it easier to reference, copy around, and port to other languages? This will be my last round of questions. I'm quite curiuos, so any info you're willing to share will be well received. If you have resources on your design choices/philosophy, I'm also interested. Link to comment
vitor Posted June 14 Author Share Posted June 14 1 hour ago, BigLaser said: this is an osascript Javascript (JSX) JXA, not JSX. 1 hour ago, BigLaser said: There are so many design decisions here, I could ask endless questions. I’m not sure I could answer endless questions, but I’ll do my best to answer the ones you have. I like curious people who genuinely want to understand. 1 hour ago, BigLaser said: Why use JSX instead of AppleScript? I presume because of personal preference? […] Does JSX do everything AS can? This answer could go on for paragraphs (and it has, I’ve written a lot about AppleScript on these forums in years past) so I’ll aim for brevity. JXA can do pretty much everything AppleScript does but the reverse is not true. One simple example which is highly relevant for Alfred is JSON. Yes, you can kind of get JSON in AppleScript but you need a ton of your own logic. This is true for a lot of other things. Plus JavaScript is easier to reason with if you’re accustomed to other languages (AppleScript’s syntax is quite foreign) and supports functional programming (which is my style). I do write AppleScript still, but in few select cases. JXA does have some bugs and behaviours I disagree with, but I use its Objective-C bridge extensively which deals with that. The major influencing choice for JXA in this case is that it ships with macOS and isn’t something complex or slow where a heavy-hitter like Swift makes a major difference. 1 hour ago, BigLaser said: Why use mountdisk as an external script? Because it’s used by two Script Filters. No reason to duplicate the code when I can literally have one line that toggles both modes. 1 hour ago, BigLaser said: This will be my last round of questions. Don’t shy away from them in the future. I may not get to them all, but I’ll try. 1 hour ago, BigLaser said: If you have resources on your design choices/philosophy, I'm also interested. I don’t, unfortunately. I do have a lot to say on the matter and could write extensively on it, though no promises it’ll ever happen. There are languages I like and languages I dislike (including a very popular one) and I could give you exact extensive reasonings as to why. I’d gladly discuss those in person—no doubt forgetting a ton of the reasonings I formed over the years only to remember them two days after the conversation—but to put them all in essay form would take at least a few days. Here’s some rapid-fire technical thoughts of the top of my head, without delving deeper: I write in a functional programming style. Avoid dependencies like the plague. Strive to understand the difference between what I prefer and what is best, make the latter the default and the former an option. Refuse the notion that software is never done; it is fine to define a goal, reach it, and stop. What I really don’t like are flamewars. I believe everyone should use whatever editor/language/OS/whatever they like and works for them, and not deride others for their choices. Those conversations cause unnecessary discord and the last thing humanity needs is to be at each other’s throats because of a keyboard layout. If you’re not harming anyone, have your fun, be weird, do you. I put a high value on empathy and ethics and think about those subjects frequently. What I am as a human does inform how I think about and apply software and design. Naturally, all of that has the disclaimer that these are my personal opinions. They are more nuanced than I can convey on a short (or I tried!) forum post and I hope I’ll continue to refine them as I learn and live. Stephen_C and BigLaser 2 Link to comment
vitor Posted June 14 Author Share Posted June 14 Updated to 2024.2. Filter out more irrelevant partition types. Thank you @gingerbeardman and @sepulchra for the reports and tests. I’ve hidden the long posts to tidy up the thread as they are no longer relevant and so it’s not overwhelming for people landing on this thread in the future. gingerbeardman, BigLaser and sepulchra 2 1 Link to comment
BigLaser Posted June 14 Share Posted June 14 (edited) Thank you for taking the time. I love tools, coding, and automation. I do it as much as possible. It's great to hear your perspective on certain design, implementation, and language choices. I appreciate your comments about flamewars. I don't argue on the internet, either. I try to find supportive people and communities to explore and discuss ideas together. I learn by asking questions, and I engage best when folks are respecting each other. JXA - Javascript for Automation! Thanks for the clarification. So many acronyms... 😜 Regarding the mountdisk JXA script - We went over why you chose JXA instead of Apple Script. Why not use zsh or another shell script? After all, the "mount" command is built into macOS. I notice that your script does quite a bit of parsing of and assigning values, strings, JSONs, etc... Dealing with strings and JSON in shell script would be a nightmare. As an anecdote, I have been automating mounting SMB shares with Alfred. I run an Alfred keyword, then an SMB share mounts, and a particular folder opens via Finder. It's handy. I've tried Apple Script and zsh in my approach. Apple Script is easier than zsh, but is also a bit funny. For instance, in Apple Script the "mount volume" command will try to mount the SMB share even if it is already mounted. That command can take time regardless if the SMB is mounted. So, I put in some checks to speed it up. "If SMB is mounted, just open the folder in Finder". Doing that if check in zsh is a nightmare for some reason. Mount points are frustrating to work with in shell. Names and IDs change or can be unreliable. In a more general sense, I suppose it's challenging to know when to apply certain approaches. Is it better to use shell script? If so, which language? Even choosing Alfred modules can be challenging (Keyword vs List Filter vs Script Filter). Like you said earlier, I need the code to work. It's not perfect, and that's okay. My workflows do the job. Personal skill growth is important for me. I enjoy exploring and expanding my skills. Even though my workflows do the job, I am curious about other approaches. Like you mentioned. What's my preference vs what is best. It can be tough to judge which is which without enough experience. I prefer the latter, but sometimes I need the thing to work so I can get back to work and enjoy having an Alfred workflow that aids and speeds up my pipeline and overall workflow. 8 hours ago, vitor said: JXA, not JSX. I’m not sure I could answer endless questions, but I’ll do my best to answer the ones you have. I like curious people who genuinely want to understand. This answer could go on for paragraphs (and it has, I’ve written a lot about AppleScript on these forums in years past) so I’ll aim for brevity. JXA can do pretty much everything AppleScript does but the reverse is not true. One simple example which is highly relevant for Alfred is JSON. Yes, you can kind of get JSON in AppleScript but you need a ton of your own logic. This is true for a lot of other things. Plus JavaScript is easier to reason with if you’re accustomed to other languages (AppleScript’s syntax is quite foreign) and supports functional programming (which is my style). I do write AppleScript still, but in few select cases. JXA does have some bugs and behaviours I disagree with, but I use its Objective-C bridge extensively which deals with that. The major influencing choice for JXA in this case is that it ships with macOS and isn’t something complex or slow where a heavy-hitter like Swift makes a major difference. Because it’s used by two Script Filters. No reason to duplicate the code when I can literally have one line that toggles both modes. Don’t shy away from them in the future. I may not get to them all, but I’ll try. I don’t, unfortunately. I do have a lot to say on the matter and could write extensively on it, though no promises it’ll ever happen. There are languages I like and languages I dislike (including a very popular one) and I could give you exact extensive reasonings as to why. I’d gladly discuss those in person—no doubt forgetting a ton of the reasonings I formed over the years only to remember them two days after the conversation—but to put them all in essay form would take at least a few days. Here’s some rapid-fire technical thoughts of the top of my head, without delving deeper: I write in a functional programming style. Avoid dependencies like the plague. Strive to understand the difference between what I prefer and what is best, make the latter the default and the former an option. Refuse the notion that software is never done; it is fine to define a goal, reach it, and stop. What I really don’t like are flamewars. I believe everyone should use whatever editor/language/OS/whatever they like and works for them, and not deride others for their choices. Those conversations cause unnecessary discord and the last thing humanity needs is to be at each other’s throats because of a keyboard layout. If you’re not harming anyone, have your fun, be weird, do you. I put a high value on empathy and ethics and think about those subjects frequently. What I am as a human does inform how I think about and apply software and design. Naturally, all of that has the disclaimer that these are my personal opinions. They are more nuanced than I can convey on a short (or I tried!) forum post and I hope I’ll continue to refine them as I learn and live. Edited June 14 by BigLaser Link to comment
gingerbeardman Posted June 15 Share Posted June 15 11 hours ago, BigLaser said: Dealing with strings and JSON in shell script would be a nightmare. It's pretty painless using jq. See my Moby Games workflow. BigLaser 1 Link to comment
vitor Posted June 15 Author Share Posted June 15 @BigLaser Don’t compare AppleScript to other languages too much, it’s a beast of its own. Its major draw is it can do what no other language (apart from JXA) can in its role automating macOS. It really depends on the situation. Shell languages are more like glue connecting different things together. It depends on what you want to do and the tools at your disposal. All of this could’ve been built in Swift too. I’ve built Disk Usage like that. Choosing a shell is easy on macOS, though. If in doubt, use Zsh which is the default and gets updates. Bash on macOS is forever stuck at an old version for licensing reasons. As for Alfred, every object has its purpose. A Keyword is just to start something. A List Filter is if you have a static list of things to choose from. A Script Filter is for when you need that list to be dynamic (e.g. getting information from the web). 54 minutes ago, gingerbeardman said: It's pretty painless using jq. It is, however, a dependency. And as per above (emphasis added): 20 hours ago, vitor said: Here’s some rapid-fire technical thoughts of the top of my head, without delving deeper: I write in a functional programming style. Avoid dependencies like the plague. Strive to understand the difference between what I prefer and what is best, make the latter the default and the former an option. Refuse the notion that software is never done; it is fine to define a goal, reach it, and stop. When having to deal with JSON from a shell on macOS, invoking osascript -l JavaScript for a quick operation also works fine. I’ve been considering some trickery with SQLite too. But again, that is my approach, I’m not prescribing it as the approach. 20 hours ago, vitor said: What I really don’t like are flamewars. I believe everyone should use whatever editor/language/OS/whatever they like and works for them, and not deride others for their choices. BigLaser 1 Link to comment
gingerbeardman Posted June 15 Share Posted June 15 (edited) I'm very open to macOS-bundled alternatives to jq I'm interested to check out as many examples as possible. Are any of them as succinct? Edited June 15 by gingerbeardman Link to comment
vitor Posted June 27 Author Share Posted June 27 On 6/15/2024 at 12:43 PM, gingerbeardman said: Are any of them as succinct? No, but that’s to be expected. jq looks to be designed specifically with that in mind and do one thing: handle JSON. So any general solution will have to be more verbose. The advantage being that they’re bundled with macOS instead of being an external dependency like jq. Link to comment
sepulchra Posted June 27 Share Posted June 27 Vitor - I'm running into fallback searches when I run this workflow suddenly. Here is the out of the debugger when running mount. I'm running Alfred 5.5 [2257] and 14.3.1: [07:50:14.352] Mount Disks[Script Filter] Queuing argument '(null)' [07:50:15.226] Mount Disks[Script Filter] Script with argv '(null)' finished [07:50:15.231] ERROR: Mount Disks[Script Filter] Code 1: /Volumes/dbox v3/Dropbox (Personal)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.7C4D4A9A-7335-4146-9B35-B93556F695C6/mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.Content') (-2700) and Unmount [07:50:50.228] Mount Disks[Script Filter] Queuing argument '(null)' [07:50:51.298] Mount Disks[Script Filter] Script with argv '(null)' finished [07:50:51.305] ERROR: Mount Disks[Script Filter] Code 1: ./mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.Content') (-2700) Link to comment
vitor Posted June 27 Author Share Posted June 27 Run this version and tell me what you see in the debugger. Link to comment
sepulchra Posted June 27 Share Posted June 27 one bit of detail I negected -- the volume that is referenced as undefined is a volume i have excluded when using eject. in my alfred prefences-->System-->Exclude. Don't know if it has any bearing but .... here is the debugger for mount: [07:58:40.608] Mount Disks[Script Filter] Queuing argument '(null)' [07:58:41.539] Mount Disks[Script Filter] Script with argv '(null)' finished [07:58:41.545] ERROR: Mount Disks[Script Filter] Code 1: {"Size":209715200,"VolumeUUID":"0E239BC6-F960-3107-89CF-1C97F78BB46B","VolumeName":"EFI","Content":"EFI","DeviceIdentifier":"disk4s1","DiskUUID":"0B5151C8-1CCA-4A71-9951-BF5D06305EEE"} ---- {"Size":2000189177856,"Content":"Apple_APFS","DeviceIdentifier":"disk4s2","DiskUUID":"800B8859-D796-415C-A483-72216A56CD89"} ---- {"Size":4000752402432,"Content":"Apple_APFS","DeviceIdentifier":"disk6s1","DiskUUID":"32D863B3-3406-42AC-8EEB-E381E508AA07"} ---- {"Size":209715200,"VolumeUUID":"0E239BC6-F960-3107-89CF-1C97F78BB46B","VolumeName":"EFI","Content":"EFI","DeviceIdentifier":"disk8s1","DiskUUID":"2AAE2541-9B64-44B0-A167-350344FC07D7"} ---- {"Size":4000577273856,"Content":"Apple_APFS","DeviceIdentifier":"disk8s2","DiskUUID":"A8EEDBA0-C508-4A50-9716-5A8031CBCF93"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk10s1","DiskUUID":"B8CED16A-0E40-4A4E-B74C-8E3072CD53F6"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk10s2","DiskUUID":"610F9F44-A909-B84F-8637-C04F7E4F5D84"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk10s3","DiskUUID":"DDAB7D8A-2FB3-C048-9F21-72A5BC7BCCEF"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk11s1","DiskUUID":"F0D961D6-659F-0C40-AC1F-DDAF1F32CDE2"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk11s2","DiskUUID":"55F5F193-47E9-5A46-A417-6F443AED13E2"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk11s3","DiskUUID":"CFB21907-45BB-4D40-9ABE-E201F25A0DE2"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk12s1","DiskUUID":"10E253B2-1EBA-CE46-AF98-548D64AE18DF"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk12s2","DiskUUID":"E66F9926-6B6C-934E-8EA5-04613D9C4261"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk12s3","DiskUUID":"AD45E81A-206D-D94D-B3BF-B0AEE62E424A"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk13s1","DiskUUID":"2A18C6BA-CE4E-1040-97FD-16BE234E136A"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk13s2","DiskUUID":"FFA1EA3E-7282-614C-B516-287260BDBB84"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk13s3","DiskUUID":"EA683953-BA83-A649-841B-3E67C5123DF0"} ---- undefined ---- /Volumes/dbox v3/Dropbox (Personal)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.7C4D4A9A-7335-4146-9B35-B93556F695C6/mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.Content') (-2700) and UNMOUNT: [08:01:50.039] Mount Disks[Script Filter] Queuing argument '(null)' [08:01:51.055] Mount Disks[Script Filter] Script with argv '(null)' finished [08:01:51.057] ERROR: Mount Disks[Script Filter] Code 1: {"Size":209715200,"VolumeUUID":"0E239BC6-F960-3107-89CF-1C97F78BB46B","VolumeName":"EFI","Content":"EFI","DeviceIdentifier":"disk4s1","DiskUUID":"0B5151C8-1CCA-4A71-9951-BF5D06305EEE"} ---- {"Size":2000189177856,"Content":"Apple_APFS","DeviceIdentifier":"disk4s2","DiskUUID":"800B8859-D796-415C-A483-72216A56CD89"} ---- {"Size":4000752402432,"Content":"Apple_APFS","DeviceIdentifier":"disk6s1","DiskUUID":"32D863B3-3406-42AC-8EEB-E381E508AA07"} ---- {"Size":209715200,"VolumeUUID":"0E239BC6-F960-3107-89CF-1C97F78BB46B","VolumeName":"EFI","Content":"EFI","DeviceIdentifier":"disk8s1","DiskUUID":"2AAE2541-9B64-44B0-A167-350344FC07D7"} ---- {"Size":4000577273856,"Content":"Apple_APFS","DeviceIdentifier":"disk8s2","DiskUUID":"A8EEDBA0-C508-4A50-9716-5A8031CBCF93"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk10s1","DiskUUID":"B8CED16A-0E40-4A4E-B74C-8E3072CD53F6"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk10s2","DiskUUID":"610F9F44-A909-B84F-8637-C04F7E4F5D84"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk10s3","DiskUUID":"DDAB7D8A-2FB3-C048-9F21-72A5BC7BCCEF"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk11s1","DiskUUID":"F0D961D6-659F-0C40-AC1F-DDAF1F32CDE2"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk11s2","DiskUUID":"55F5F193-47E9-5A46-A417-6F443AED13E2"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk11s3","DiskUUID":"CFB21907-45BB-4D40-9ABE-E201F25A0DE2"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk12s1","DiskUUID":"10E253B2-1EBA-CE46-AF98-548D64AE18DF"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk12s2","DiskUUID":"E66F9926-6B6C-934E-8EA5-04613D9C4261"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk12s3","DiskUUID":"AD45E81A-206D-D94D-B3BF-B0AEE62E424A"} ---- {"Size":2322432,"Content":"B6FA30DA-92D2-4A9A-96F1-871EC6486200","DeviceIdentifier":"disk13s1","DiskUUID":"2A18C6BA-CE4E-1040-97FD-16BE234E136A"} ---- {"Size":7340032,"Content":"2E313465-19B9-463F-8126-8A7993773801","DeviceIdentifier":"disk13s2","DiskUUID":"FFA1EA3E-7282-614C-B516-287260BDBB84"} ---- {"Size":20000444973056,"Content":"FA709C7E-65B1-4593-BFD5-E71D61DE9B02","DeviceIdentifier":"disk13s3","DiskUUID":"EA683953-BA83-A649-841B-3E67C5123DF0"} ---- undefined ---- ./mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.Content') (-2700) Link to comment
sepulchra Posted June 27 Share Posted June 27 one question: does the script output some message when there are not valid partitions to mount? I thought it did? one note -- the debugger message below is with no valid partitions to mount and moves to a fallsback search. When there is a valid partition to mount, it works as intended. mount: ./mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.Content') (-2700) [08:12:23.660] Mount Disks[Script Filter] Queuing argument '(null)' [08:12:24.861] Mount Disks[Script Filter] Script with argv '(null)' finished [08:12:24.867] Mount Disks[Script Filter] {"items":[{"variables":{},"subtitle":"2 MB","arg":"disk10s1"},{"variables":{},"subtitle":"7 MB","arg":"disk10s2"},{"variables":{},"subtitle":"20 TB","arg":"disk10s3"},{"variables":{},"subtitle":"2 MB","arg":"disk11s1"},{"variables":{},"subtitle":"7 MB","arg":"disk11s2"},{"variables":{},"subtitle":"20 TB","arg":"disk11s3"},{"variables":{},"subtitle":"2 MB","arg":"disk12s1"},{"variables":{},"subtitle":"7 MB","arg":"disk12s2"},{"variables":{},"subtitle":"20 TB","arg":"disk12s3"},{"variables":{},"subtitle":"2 MB","arg":"disk13s1"},{"variables":{},"subtitle":"7 MB","arg":"disk13s2"},{"variables":{},"subtitle":"20 TB","arg":"disk13s3"}]} unmount now works as intended. Link to comment
vitor Posted June 27 Author Share Posted June 27 33 minutes ago, sepulchra said: does the script output some message when there are not valid partitions to mount? I thought it did? It does, but those results don’t have a name, which is why they are not showing. Another one. Link to comment
sepulchra Posted June 27 Share Posted June 27 Thanks. and Thanks for continuing to chip away at this. Now both mount and unmount fallback: mount: [08:53:48.190] Logging Started... [08:53:54.313] Mount Disks[Script Filter] Queuing argument '(null)' [08:53:54.511] Mount Disks[Script Filter] Script with argv '(null)' finished [08:53:54.517] ERROR: Mount Disks[Script Filter] Code 1: /Volumes/dbox v3/Dropbox (Personal)/Alfred/Alfred.alfredpreferences/workflows/user.workflow.7C4D4A9A-7335-4146-9B35-B93556F695C6/mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.VolumeName') (-2700) unmount: [08:55:32.419] Mount Disks[Script Filter] Queuing argument '(null)' [08:55:32.685] Mount Disks[Script Filter] Script with argv '(null)' finished [08:55:32.691] ERROR: Mount Disks[Script Filter] Code 1: ./mountdisk: execution error: Error: TypeError: undefined is not an object (evaluating 'partition.VolumeName') (-2700) Link to comment
sepulchra Posted June 27 Share Posted June 27 Mount returns " No Unmounted Partitions Found" which is accurate. Unmount returns: "No Unmounted Partitions Found" as well. debugger: [09:22:08.069] Mount Disks[Script Filter] Queuing argument '(null)' [09:22:08.394] Mount Disks[Script Filter] Script with argv '(null)' finished [09:22:08.400] Mount Disks[Script Filter] {"items":[{"title":"No Unmounted Disk Partitions Found","valid":false}]} Link to comment
vitor Posted June 27 Author Share Posted June 27 So is that a success? Are you seeing what you expected? Link to comment
sepulchra Posted June 27 Share Posted June 27 sorry -- there are several mounted volumes so when running unmount it should return a list of volumes. Also if there are no volumes to unmount, shouldn't the output be "No Mounted Partitions Found" Link to comment
vitor Posted June 27 Author Share Posted June 27 This is getting very difficult to debug, because I can’t test with the disks you have or know what the output should be. The original issue was that one of your drives was returning undefined, which shouldn’t happen and is unexpected from an OS point of view. Had you connected that drive before? Did it use to work? If so, go back to the original workflow version from the Gallery and reboot to see if that fixes it. The mounted message is indeed wrong; will be fixed in the next version. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now