kyt icon indicating copy to clipboard operation
kyt copied to clipboard

add --version flag to kyt-cli

Open jaredmcdonald opened this issue 8 years ago • 6 comments

Add a flag to kyt-cli that returns the current version from package.json and exits 0. Should probably be -v and --version. Originally came up in #490.

Bug or Feature?

Feature

jaredmcdonald avatar May 26 '17 18:05 jaredmcdonald

Mind if I take this one? @jaredmcdonald

blakeyoder avatar Jul 11 '17 03:07 blakeyoder

all yours, @blakeyoder! thanks

jaredmcdonald avatar Jul 11 '17 04:07 jaredmcdonald

@jaredmcdonald Quick question on this one. I've noticed that if I run a command such as kyt-cli list then the output starts with the version of yarn that is installed - maybe it has something to do with the symlink at setup?

For example, kyt-cli list - notice the yarn version at the top

img

This shows up with the command I wrote

kyt-cli version - yarn version first then app version second img2

I wanted to see if this is happening on your build? I might have just setup something wrong...Thanks!

blakeyoder avatar Jul 16 '17 21:07 blakeyoder

This is also happening in my build @blakeyoder I haven't dug into why yet, but we are seeing it too so you're set up correctly!

ccpricenytimes avatar Jul 19 '17 20:07 ccpricenytimes

the yarn version you were seeing is from https://github.com/NYTimes/kyt/blob/78986e60aa5021a2332d741612292f7d327f5570/packages/kyt-cli/utils/yarnOrNpm.js#L4-L6

skvale avatar May 09 '18 01:05 skvale

To hide the yarn version from kyt-cli commands, something like

const isYarnInstalled = () => shell.exec('[ -x "$(command -v yarn)" ]').code === 0;

could work

skvale avatar May 09 '18 01:05 skvale