mirror of https://github.com/tauri-apps/tauri
fix(cli): fix `tauri migrate` failing to install NPM deps when running from Deno
This commit is contained in:
parent
c43d5df158
commit
f9a74d45ae
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
"tauri-cli": "patch:bug"
|
||||
"@tauri-apps/cli": "patch:bug"
|
||||
---
|
||||
|
||||
Fix `tauri migrate` failing to install NPM depenencies when running from Deno.
|
||||
|
|
@ -93,10 +93,7 @@ pub fn run(options: Options) -> Result<()> {
|
|||
}));
|
||||
|
||||
let npm_spec = match (npm_version_req, options.tag, options.rev, options.branch) {
|
||||
(Some(version_req), _, _, _) => match manager {
|
||||
PackageManager::Deno => format!("npm:{npm_name}@{version_req}"),
|
||||
_ => format!("{npm_name}@{version_req}"),
|
||||
},
|
||||
(Some(version_req), _, _, _) => format!("{npm_name}@{version_req}"),
|
||||
(None, Some(tag), None, None) => {
|
||||
format!("tauri-apps/tauri-plugin-{plugin}#{tag}")
|
||||
}
|
||||
|
|
|
@ -89,10 +89,15 @@ impl PackageManager {
|
|||
.join(", ")
|
||||
);
|
||||
|
||||
let status = self
|
||||
.cross_command()
|
||||
.arg("add")
|
||||
.args(dependencies)
|
||||
let mut command = self.cross_command();
|
||||
command.arg("add");
|
||||
|
||||
match self {
|
||||
PackageManager::Deno => command.args(dependencies.into_iter().map(|d| format!("npm:{d}"))),
|
||||
_ => command.args(dependencies),
|
||||
};
|
||||
|
||||
let status = command
|
||||
.current_dir(frontend_dir)
|
||||
.status()
|
||||
.with_context(|| format!("failed to run {self}"))?;
|
||||
|
|
Loading…
Reference in New Issue