Closed ferni7 closed 5 years ago
I took a closer look, what's throwing it off is that when installing flightplan with yarn, the bin symlink points to another symlink which points to the actual code. So, commander's logic is to only resolve the symlink once. This was probably a recent change in yarn behavior, and I'm not versed enough in Yarn to know why they did it (or if there's an easy way to turn it off), but I'm seeing the same problem with other Commander projects that use subcommands (when installed with yarn on Ubuntu).
I've filed https://github.com/tj/commander.js/issues/866, and will hopefully be able to put a fix together soon (it'll have to be fixed in CommanderJS). In the meantime, you could probably manually make the ~/.yarn/bin symlink point directly to flightplan's cli.js. Sorry for the inconvenience!
Having this same issue on macOS.
Is this PR related to the underlying symlink issue?
Yes, same issue. My fix was very similar to @KillWolfVlad, except I wasn't using a 3rd party dependency. I had some simple bug in my loop logic though, so if tj/commander.js#869 works, I'll probably pull that into my fork (flightplan-tool uses my own forked version of commander.js, because of another issue I had to patch manually which I'm still waiting for them to merge and release). When I'm at my Ubuntu machine later, I'll test the patch.
I've merged @KillWolfVlad's PR into my own fork, so flightplan-tool should now pick up the fix. Can you try a yarn global upgrade flightplan-tool
(fix was added in 0.2.4), and report if the issue is fixed for you?
Working on macOS. Thanks!
Fresh Ubuntu 18 install with below then running flight plan search returns error. Related to the way you're calling commands with commander
andrew@FlightPlanVM2:~$ flightplan search
flightplan-search(1) does not exist, try --help