Skip to content

Validation for tns update before we execute it #3669

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

Closed
dtopuzov opened this issue Jun 6, 2018 · 2 comments · Fixed by #5479
Closed

Validation for tns update before we execute it #3669

dtopuzov opened this issue Jun 6, 2018 · 2 comments · Fixed by #5479
Labels
bug severity: low update Describes issues related to update command or updating from one version of CLI to another

Comments

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 6, 2018

Tell us about the problem

Create project with 4.1.0
Run tns update @rc
This is invalid (it should be tns update rc).
It try to upgrade and roll back to original since @rc is invalid.
Can we validate before even try to update?

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.1.0
  • Cross-platform modules: 4.1.0
  • Runtime(s): 4.1.0
  • Plugin(s): No
@Fatme Fatme added the bug label Jul 18, 2018
@rosen-vladimirov rosen-vladimirov added the update Describes issues related to update command or updating from one version of CLI to another label May 22, 2019
@janoshrubos
Copy link
Contributor

janoshrubos commented Jan 19, 2021

This has been implemented since this issue was created.
The CLI checks the version before update and throws error if the version is incorrect: Could not update the project! Reason is: Unable to execute update as package @nativescript/core does not have version/tag @rc. Please enter valid version or npm tag.

cc: @rigor789

@rigor789
Copy link
Member

@janoshrubos I think the message is correct - however it's shown after the backup has been created/restored

} catch (error) {
this.restoreBackup(
UpdateController.folders,
backupDir,
projectData.projectDir
);
this.$logger.error(
`${UpdateController.updateFailMessage} Reason is: ${error.message}`
);
}

We could perhaps do the checks earlier in the call - before the project is cleaned/backed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug severity: low update Describes issues related to update command or updating from one version of CLI to another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants