Skip to content

Commit

Permalink
[npm#5280] remove --no-save handling, left as non-supported
Browse files Browse the repository at this point in the history
  • Loading branch information
ficocelliguy committed Mar 15, 2024
1 parent 7db7c47 commit 8e19394
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions workspaces/config/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ class Config {

// Only set 'save' to true if a saveType has been specified
// and if 'save' is false due to non-default config
if (!this.isDefault('save') && this.#flatOptions.saveType
&& !this.argv?.includes('--no-save')) {
if (!this.isDefault('save') && this.#flatOptions.saveType) {
this.#flatOptions.save = true
}
this.#flatOptions.nodeBin = this.execPath
Expand Down
4 changes: 0 additions & 4 deletions workspaces/config/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,6 @@ t.test('manages the save flag when flat is retrieved', t => {
const c = await buildConfig(['--no-save'], true)
t.equal(c.flat.save, false)
})
t.test('oes not overwrite save --no-save is present in addition to save flag', async t => {
const c = await buildConfig(['--save-prod', '--no-save'], true)
t.equal(c.flat.save, false)
})
t.end()
})

Expand Down

0 comments on commit 8e19394

Please sign in to comment.