brianp / muxed

Another TMUX project manager
MIT License
59 stars 3 forks source link

Should bootstrap the configuration directory upon first run #10

Closed scottbrown closed 8 years ago

scottbrown commented 8 years ago

Version 0.3.1

I ran muxed exampleproject and it complained about the file not being in the default configuration directory ($HOME/.muxed). That's because I hadn't copied the tmuxinator file over to muxed yet. However, what I expected muxed to do was to create the default configuration directory upon first call (letting me know that it did this). I'm guessing that I have to create that configuration directory manually.

I expected something like:

$ muxed
Looks like this is your first time here.  I could not find default configuration directory: $HOME/.muxed.  Creating it now.

.. normal output here ...

This only runs when the default (or given) configuration directory cannot be found.

brianp commented 8 years ago

Hey Scott,

Thanks for reporting this. I agree with your expectation about it writing the home dir on first run. I decided to wait until more people tested it and confirmed the flaw before writing it in.

One clarification: If the first call you made was muxed exampleproject, Muxed should generate output like you mentioned above, but afterwards still complain the project file isn't present (as normal output)?

I'll see what I can do about it soon-ish. 👍

scottbrown commented 8 years ago

Yes, the same error still applies of course. Both good and bad scenarios will work, I just said normal output but I really should have said stdout/stderr.

brianp commented 8 years ago

PR opened. I'll post a 0.4.0 release up once the tests pass.

I think the natural progression from this situation is to not just bootstrap the project directory, but to also write that first file for you.

It would be under the circumstance of first run only. No project dir? Create the dir, create the project file you tried to call. Principle of least surprise. I'll create a new issue for it as it will depend on the subcommand new to be finished as I've written the template generation command as a separate bin.

In cases where the project dir exists but project is missing, this is not considered a "first run" and will simply complain about the project file not existing.

brianp commented 8 years ago

Release 0.4.0 available for download. :grin: