bevry / dorothy

🧙🏻‍♀️ Bring your dotfile commands and configuration to any shell. Sensible defaults and hundreds of commands preloaded. Supports Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows.
Other
277 stars 21 forks source link

prevent no folder error #196

Closed wasdee closed 6 months ago

balupton commented 6 months ago

Interesting. Do you recall the steps you took to encounter this error? Was it via running setup-util-nu in trial mode? As via the install method, the user configuration should have already been setup by dorothy install

wasdee commented 6 months ago

Interesting. Do you recall the steps you took to encounter this error? Was it via running setup-util-nu in trial mode? As via the install method, the user configuration should have already been setup by dorothy install

I found this when I ran bash -ic "$(curl -fsSL https://dorothy.bevry.me/install)" on newly install WSL2, Ubuntu

balupton commented 6 months ago

Okay, thank you. I will try and reproduce and see what is the best option for solving this:

  1. use the mkdirp workaround of this PR: could affect user profile setup later
  2. not have setup-util-nu touch user config files if user config doesn't exist; could cause nu to fail if nu is configured for dorothy; so perhaps setup-util-nu should remove the dorothy config loading if the files aren't there
  3. have setup-util-nu also handle the dorothy configuration for nu
  4. have the user profile setup still offer full customisation if it is only these nu configuration files that were scaffolded

I'm leaning towards 2.

I'll pick this up in a day or few, currently wrapping up some typescript conversions.

If you have any feedback for Dorothy, let me know. Eager to help out in any way.

balupton commented 6 months ago

Was able to reproduce. Shocking.

Will fix this up over the coming days, and make sure that our tests catch such things in the future — I'm surprised they didn't catch this!

balupton commented 6 months ago

Went with an alternative approach that will still enable the custom user configuration flow. Seems fixed now. Hope you enjoy Dorothy, sorry for the inconvenience! Thank you so much for reporting.