AdobeXD / xdpm

A helper CLI for XD plugin development
https://github.com/AdobeXD/xdpm/blob/master/README.md
Apache License 2.0
65 stars 15 forks source link

xdpm searches for wrong folder #5

Closed pklaschka closed 5 years ago

pklaschka commented 6 years ago

When I'm trying to run xdpm install, xdpm watch or xdpm ls with the Release version of Adobe XD (it works for the prerelease version with -w p) on Windows, I get the following error message:

ERROR: Could not locate C:\Users\pablo\AppData\Local\Packages\Adobe.CC.XD.adky2gkssdxte\LocalState. Do you have the release version of Adobe XD CC installed?

The problem here is that xdpm searches for an Adobe.CC.XD.adky2gkssdxte-folder, while only an Adobe.CC.XD_adky2gkssdxte-folder exists (_ instead of .).

pklaschka commented 6 years ago

I just opened a pull request fixing the issue: #6

littlebusters commented 5 years ago

I got the same error with XD 18.1.12.1 and xdpm 2.0.0 on macOS(10.14.4).

ERROR: Could not locate /Users/*****/Library/Application Support/Adobe/Adobe XD CC. Do you have the release version of Adobe XD CC installed?

There is an 'Adobe XD' folder exist in '/Users/*****/Library/Application Support/Adobe/'.

ashryanbeats commented 5 years ago

I’m on my phone at the moment so I can’t check yet, but this is likely due to the fact that XD has changed its name from “Adobe XD CC” to “Adobe XD”, and therefore the relevant /Library folder has also changed names.

If so, the cause of the issue is here:

https://github.com/AdobeXD/xdpm/blob/master/lib/constants.js.

Can you confirm the application name you have?

Note that this should only affect Mac I believe.

littlebusters commented 5 years ago

Thanks reply. The application name is "Adobe XD". It also worked correctly when I fixed from "Adobe XD CC" to "Adobe XD" in the lib/constants.js.

From:

"r": path.join(home, "Library", "Application Support", "Adobe", "Adobe XD CC"),
"p": path.join(home, "Library", "Application Support", "Adobe", "Adobe XD CC (Prerelease)"),
"d": path.join(home, "Library", "Application Support", "Adobe", "Adobe XD CC (Dev)")

To:

"r": path.join(home, "Library", "Application Support", "Adobe", "Adobe XD"),
"p": path.join(home, "Library", "Application Support", "Adobe", "Adobe XD (Prerelease)"),
"d": path.join(home, "Library", "Application Support", "Adobe", "Adobe XD (Dev)")

I have no environment to test on Windows.

ashryanbeats commented 5 years ago

Thanks for checking!

My understanding is that Windows remains unaffected because the equivalent folders don’t change names even if the app does. We need to verify that, in addition to patching the Mac version.

Reopening this issue.

ashryanbeats commented 5 years ago

And now I see Kerri has already put in a PR for this:

https://github.com/AdobeXD/xdpm/pull/17/files

ashryanbeats commented 5 years ago

Fixed by https://github.com/AdobeXD/xdpm/pull/17

cc @kerrishotts @dkstevekwak