-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: use existing versions if available #223
Conversation
@@ -279,7 +322,7 @@ export default class UpdateCommand extends Command { | |||
.on('error', reject) | |||
.on('close', (status: number) => { | |||
try { | |||
this.exit(status) | |||
if (status > 0) this.exit(status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean status=0
won't exit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya it will exit normally. Why does exit even need to be called here? I did this because it was printing an EXIT error to the terminal even though it was status 0. Why does exit return an error when it is 0? https://github.com/oclif/command/blob/master/src/command.ts#L119
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏄 Very cool!
# [1.4.0](v1.3.10...v1.4.0) (2021-05-17) ### Bug Fixes * determine current version helper ([oclif#212](https://github.com/sumwatshade/plugin-update/issues/212)) ([94e7d61](94e7d61)) * ensure tarball is extracted correctly ([8023c08](8023c08)) * preserve old behavior ([3c8d231](3c8d231)) * release a version ([a67e8fa](a67e8fa)) * remove oclif references ([3d6acd2](3d6acd2)) * test deployment ([4c01af7](4c01af7)) * test deployment ([e7d87eb](e7d87eb)) * use clientBin property for reading version ([oclif#226](https://github.com/sumwatshade/plugin-update/issues/226)) ([800dba6](800dba6)) ### Features * **switching:** allows cli to switch versions with param ([72d6602](72d6602)) * save clients nested via their git sha ([oclif#211](https://github.com/sumwatshade/plugin-update/issues/211)) ([fc81773](fc81773)) * support oclif upload/promote cmds new s3 key structure ([oclif#204](https://github.com/sumwatshade/plugin-update/issues/204)) ([c2d7a46](c2d7a46)) * use existing versions if available ([oclif#223](https://github.com/sumwatshade/plugin-update/issues/223)) ([da27783](da27783))
# [1.4.0](v1.3.10...v1.4.0) (2022-01-08) ### Bug Fixes * add docs for each command ([1066934](1066934)) * add explicit version check ([6a41c1a](6a41c1a)) * add public release config ([db7cec9](db7cec9)) * add success msg + fix tar ext ([e7c5729](e7c5729)) * build on ci ([b088955](b088955)) * channel determination null checking ([a266120](a266120)) * check if channelUpdateRequested is req ([4685a72](4685a72)) * code organization and prep for requests around installation aliases ([1c7791d](1c7791d)) * configuration changes ([8638fbd](8638fbd)) * deps and build ([b6cbc15](b6cbc15)) * determine current version helper ([oclif#212](https://github.com/intuit/plugin-update/issues/212)) ([94e7d61](94e7d61)) * errors ([6e0eb3d](6e0eb3d)) * extract symlinks from node modules ([52fc421](52fc421)) * first pass formatting ([5d82adc](5d82adc)) * lint ([3be6770](3be6770)) * no reexec on install ([f55aa79](f55aa79)) * node 10 in prs ([a6e1094](a6e1094)) * null checking on client root ([fed04a3](fed04a3)) * prettier ([142ef3e](142ef3e)) * propagate channel information ([d676bb8](d676bb8)) * release a version ([a67e8fa](a67e8fa)) * release on main ([#2](#2)) ([5d8822a](5d8822a)) * remove install command ([6784f81](6784f81)) * remove oclif references ([3d6acd2](3d6acd2)) * remove sha when extracting target version ([67dfe55](67dfe55)) * respect prettier config in ide ([2382a3e](2382a3e)) * run lint on CI ([0e288a7](0e288a7)) * small tweak ([70e7674](70e7674)) * stable resolution ([92c3493](92c3493)) * strict prerelease channels ([3e4af7a](3e4af7a)) * strip partials ([56383cf](56383cf)) * symlink resolution for older builds ([fbd48df](fbd48df)) * tdd for use command ([a527b31](a527b31)) * test deployment ([4c01af7](4c01af7)) * test deployment ([e7d87eb](e7d87eb)) * test downloadAndExtract ([b5919bb](b5919bb)) * test downloadAndExtract ([8a7ab05](8a7ab05)) * tests ([eea1b80](eea1b80)) * tests ([d0a8e3e](d0a8e3e)) * udpate channel to stable if version request is not a diff channel ([5314226](5314226)) * update channel ([0597f6e](0597f6e)) * update command revert ([2edd0a4](2edd0a4)) * update comment ([2f8dc5c](2f8dc5c)) * update formatting ([ab71f47](ab71f47)) * use 14 for publish ([a74451d](a74451d)) * use clientBin property for reading version ([oclif#226](https://github.com/intuit/plugin-update/issues/226)) ([800dba6](800dba6)) * use config ([01c6f9d](01c6f9d)) * use github actions ([7a92029](7a92029)) * work in node 10 ([oclif#38](https://github.com/intuit/plugin-update/issues/38)) ([1b01541](1b01541)) ### Features * add success msg and improved error msg ([a14001f](a14001f)) * cut over to intuit namespace ([#1](#1)) ([4c08ec3](4c08ec3)) * pass in specific version ([7bbb48e](7bbb48e)) * provide major versions ([9ac3c71](9ac3c71)) * save clients nested via their git sha ([oclif#211](https://github.com/intuit/plugin-update/issues/211)) ([fc81773](fc81773)) * support oclif upload/promote cmds new s3 key structure ([oclif#204](https://github.com/intuit/plugin-update/issues/204)) ([c2d7a46](c2d7a46)) * tweak behavior ([a218149](a218149)) * update install command ([6cecef6](6cecef6)) * update use command ([598af92](598af92)) * use existing versions if available ([oclif#223](https://github.com/intuit/plugin-update/issues/223)) ([da27783](da27783)) ### Reverts * Revert "feat(switching): allows cli to switch versions with param" ([e51fc48](e51fc48)) * Revert "chore: pull versions back into local section" ([f3fbad3](f3fbad3)) * Revert "fix: ensure tarball is extracted correctly" ([d941769](d941769)) * Revert "chore: clear yarn lockfile changes" ([f974883](f974883)) * Revert "fix: preserve old behavior" ([d06de48](d06de48))
If an existing version if it already exists. Now that channels are just pointers, I could switch to channels that point to the same version. If so, there is no need to download it again. Likewise, if a channel pointer is revered, there is no need to download it again.
In addition, if I run into a bug and I want to switch back to an older version of the CLI, there is not an easy way to switch back. Using
--from-local
will enable this capability.