Skip to content

Commit

Permalink
Remove install hint from deno mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Feb 10, 2023
1 parent 3bd1e5c commit 2b140bc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const npmInstall = async (

// prompt the user if they want ncu to run "npm install"
if (options.interactive && !process.env.NCU_DOCTOR) {
console.info('')
print(options, '')
const response = await prompts({
type: 'confirm',
name: 'value',
Expand Down Expand Up @@ -210,8 +210,15 @@ async function runUpgrades(options: Options, timeout?: NodeJS.Timeout): Promise<

// suggest install command or auto-install
if (options.upgrade) {
// if workspaces, install from root project folder
await npmInstall(isWorkspace ? ['package.json'] : packageFilepaths, analysis, options)
// deno does not have an install command
// The closest equivalent is deno cache, but it is optional.
// See: https://deno.land/manual@v1.30.3/references/cheatsheet#nodejs---deno-cheatsheet
if (options.packageManager === 'deno') {
print(options, '')
} else {
// if workspaces, install from root project folder
await npmInstall(isWorkspace ? ['package.json'] : packageFilepaths, analysis, options)
}
}

return analysis
Expand Down

0 comments on commit 2b140bc

Please sign in to comment.