-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[for discussion] move default localStorage location under $HOME #122
Comments
It depends what you're trying to achieve? If you're trying to input a long path into a short directory then you're going to see an error, if you'll forgive my use of non-standard coding jargon regarding this particular instance which is actually the best way to describe it at the moment. |
@GranularDetective not sure what you mean...i'm just talking about access privileges |
Oh. Why do you want to sudo again? I suppose true root is much more On 1 March 2016 at 10:58, Mark Vayngrib notifications@github.com wrote:
|
Why don't you want to sudo again, rather. Muh bad. On 1 March 2016 at 11:10, Peter Carter peter.carter.mail@gmail.com wrote:
|
@mvayngrib agreed. We just need a cross-platform temp dir. I think I implemented this in wat anyways, before I added localstorage to Vorpal. Should be a pretty easy fix. |
@dthree if you don't end up separating it out of wat, there's user-home and home-or-tmp |
You added local storage to Vorpal? To wat purpose?
|
Okay thanks. |
Fixed in |
I know this is an old issue, but I just found it, while trying to figure out where this was stored. I think using I think the original suggestion of it being somewhere in the home directory is better. There's frequently a |
For reference, this is how yarn does it: function getDirectory(category: string): string {
// use %LOCALAPPDATA%/Yarn on Windows
if (process.platform === 'win32' && process.env.LOCALAPPDATA) {
return path.join(process.env.LOCALAPPDATA, 'Yarn', category);
}
// otherwise use ~/.{category}/yarn
return path.join(userHome, `.${category}`, 'yarn');
}
function getCacheDirectory(): string {
if (process.platform === 'darwin') {
return path.join(userHome, 'Library', 'Caches', 'Yarn');
}
return getDirectory('cache');
} So, I think something like that would be a good option for vorpal. |
i ran into a problem when trying out your cash project. With my nodejs/npm setup, global installs require sudo:
sudo npm i -g cash
however, because of that, cash doesn't have permissions to write to its own localstorage directory:
obviously i don't want to run cash with sudo :)
isn't it more typical to put this kind of storage in ~/.vorpal or ~/.cash or somewhere else under
$HOME
?The text was updated successfully, but these errors were encountered: