Skip to content
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

$NOTION_HOME is set but is not a directory on reinstall #166

Closed
ibraheem4 opened this issue Oct 18, 2018 · 5 comments · Fixed by #418
Closed

$NOTION_HOME is set but is not a directory on reinstall #166

ibraheem4 opened this issue Oct 18, 2018 · 5 comments · Fixed by #418

Comments

@ibraheem4
Copy link

After installing notion via curl, I deleted the folder that was created and tried reinstalling again then get this error:

Error: $NOTION_HOME is set but is not a directory ($HOME/.notion)

Workaround would be to mkdir $HOME/.notion first, but it's something the tool should be able to detect I think.

@ibraheem4 ibraheem4 changed the title $NOTION_HOME is set but is not a directory on reinstall $NOTION_HOME is set but is not a directory on reinstall Oct 18, 2018
@rwjblue
Copy link
Contributor

rwjblue commented Oct 18, 2018

The install script also installs a bit of config to your shell which is what sets $NOTION_HOME. Currently there is no "implode" command, so removing roughly amounts to rm -rf ~/.notion and updating ~/.bashrc and/or ~/.zshrc to remove the two lines added by the install script.

@rwjblue
Copy link
Contributor

rwjblue commented Oct 18, 2018

The specific error that you see is from here:

https://github.com/notion-cli/notion/blob/05b6b795a732602b7301e6b08a4353caa712c191/dev/unix/install.sh.in#L159-L163

We can likely tweak the language to be a bit more specific about what to do to clear notion from your user profile config in the second part of this message...

@ibraheem4
Copy link
Author

ibraheem4 commented Oct 18, 2018

Thanks for the comments @rwjblue i think most CLIs will log to the console that an entry was made to .bashrc and/or ~/.zshrc. If we added some info that this was occurring it would be easier for developers to know how to "implode".

@scalvert
Copy link
Contributor

Agree with this ^

@chriskrycho
Copy link
Contributor

The actual bug reported here has been resolved with updates to the installer along the way; we now cleanly install and warn if your profile still mentions Volta:

$ rm -rf ~/.volta
$ cargo build --release && ./dev/unix/build.sh && ./dev/unix/install.sh
    Finished release [optimized] target(s) in 0.68s
    Creating Volta directory tree (/Users/chris/.volta)
   Unpacking `volta` executable and shims
     Editing user profile

Warning: Your profile (/Users/chris/.config/fish/config.fish) already mentions
         Volta and has not been changed.

    Finished installation. Open a new terminal to start using Volta!

We also notify you that we're modifying your profile:

    Finished release [optimized] target(s) in 0.32s
    Creating Volta directory tree (/Users/chris/.volta)
   Unpacking `volta` executable and shims
     Editing user profile
    Finished installation. Open a new terminal to start using Volta!

I think it'd be nice if we specified which profile we're editing when we do that, e.g.:

     Editing user profile `/Users/chris/.bash_profile`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants