hammerspoon icon indicating copy to clipboard operation
hammerspoon copied to clipboard

Fix hs.fs.volume test

Open cmsj opened this issue 2 years ago • 4 comments

cmsj avatar Mar 11 '22 10:03 cmsj

View Test Results

    1 files      2 suites   18m 54s :stopwatch: 338 tests 290 :heavy_check_mark: 47 :zzz: 1 :x:

For more details on these failures, see this check.

Results for commit eeadead6.

github-actions[bot] avatar Mar 11 '22 11:03 github-actions[bot]

Hmm, I'm not sure what is going on here. This passes before and after on my x86 mac, and on my ARM macbook, but not on an ARM Mini.

cmsj avatar Mar 12 '22 11:03 cmsj

I think the problem is that info.path is just a string:

info: {
  name = "renamedDisk",
  oldName = "ramDisk",
  oldPath = "file:///Volumes/ramDisk/",
  path = "file:///Volumes/renamedDisk%205/"
}

...so it fails on:

newPath = info.path and info.path.filePath:match("(/Volumes/"..ramdiskRename..")/?$")

latenitefilms avatar Mar 13 '22 06:03 latenitefilms

@cmsj - Random idea... does a specific extension need to load first, because you can use NSURL's in Lua-land?

latenitefilms avatar Mar 22 '22 06:03 latenitefilms