It would be awesome if you were able to define paths in a way which would work cross-platform.
Perhaps something like this:
"projectManager.git.baseFolders": [
"${home}/code/repos" # cross-platform
]
or perhaps like this:
"projectManager.git.baseFolders": [
"${env.HOME}/code/repos", # macOS, Linux
"${env.HOMEPATH}/code/repos", # Windows
]
Actually, the option "projectManager.projectsLocation" seems not to work at all for me on my Mac. Even with absolute path.
Hi @DavidBabel , are you commenting here because you are using $home in the settings? If yes, this will be the reason, because it is not supported. The $home use is only for project path in package.json (for now).
Hey,
Actually i was commenting because absolute path on mac does not work either.
Are you editing package.json and replacing your _home folder_ by $home, and it does not work? That's strange because it should have been fixed in the latest release (0.13.2).
If that's the case, please fill another issue so I could track this error. But unfortunatelly I have no macOS available to test right now :(
I can confirm this does not work for me neither on MAC OS 10.12.3. I have tried $home, $HOME, ~, and absolute path.
Question:
Since there are no examples for a MAC project path, I am assuming the directory seperator is "/" instead of the windows examples "\". Is this correct?
Thanks
Sorry I meant "\" for windows separator.
Github stripping the double backslash.
Yes it's supposed to be. You can use code tag <> to produce "code" on github : \\
Can you confirm that the config projectManager.projectsLocation does not work yet ?
Since it's commented here :
https://github.com/alefragnani/vscode-project-manager/blob/master/extension.ts#L179
Yes this works for me. The "Root Path" inside the projects.json does not.
Another suggestion: make ~ work as the root of a path, e.g. ~/projects/foo. I actually tried this as the first thing after installing the plugin!
This way you don't need to add multiple entries for HOME/HOMEPATH.
The only thing that works for me (mac) is an absolute path like /Users/username/git. Anything else does not work, including ~/git, ${env.home}/git and ${HOME}/git. Allowing ~ or an environment variable would be great.
The $home variable should work, no matter the OS, inside projects.json file. In fact, it is used automatically when you use the Save Project command. I noted an issue in Windows related to _case sensitive_, which is not correctly detecting the path, so for now, it is not saving $home in projects.json yet on that OS.
If anyone is still having any problem with this, please fill another issue to be tracked. Also, I don't have a MacOS machine anymore to test, so I appreciate any help.
I will update the extension to allow $home also in projectManager.projectsLocation and projectManager.xxx.baseFolders settings. Doing so, these configurations will also support cross platform/machine. I know ~ variable from MacOS/Linux, but I prefer to use an _agnostic_ approach.
Stay tuned
FWIW, ~ also works on Windows (in PowerShell). But $home in the main settings would be fine too 馃憤
Just released version 0.16.0 supporting $home in projectManager.xxx.baseFolders.
Update and enjoy 馃槃
Most helpful comment
Just released version 0.16.0 supporting
$homeinprojectManager.xxx.baseFolders.Update and enjoy 馃槃