Skip to content

Commit a35b009

Browse files
committed
rename no-rollback to skip-rollback
1 parent eb19c9a commit a35b009

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/commands/remove.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('remove command with rollback', () => {
8383
assert.equal(updatedManifest.patches['pkg:npm/[email protected]'], undefined)
8484
})
8585

86-
it('should allow removal without rollback using --no-rollback flag', async () => {
86+
it('should allow removal without rollback using --skip-rollback flag', async () => {
8787
const { manifestPath, packageDirs } = await setupTestEnvironment({
8888
testDir: path.join(testDir, 'norollback1'),
8989
patches: [
@@ -103,7 +103,7 @@ describe('remove command with rollback', () => {
103103

104104
const pkgDir = packageDirs.get('pkg:npm/[email protected]')!
105105

106-
// Simulate --no-rollback: only remove from manifest without rollback
106+
// Simulate --skip-rollback: only remove from manifest without rollback
107107
const manifestContent = await fs.readFile(manifestPath, 'utf-8')
108108
const manifest = PatchManifestSchema.parse(JSON.parse(manifestContent))
109109

src/commands/remove.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface RemoveArgs {
1616
identifier: string
1717
cwd: string
1818
'manifest-path': string
19-
'no-rollback': boolean
19+
'skip-rollback': boolean
2020
}
2121

2222
async function removePatch(
@@ -83,7 +83,7 @@ export const removeCommand: CommandModule<{}, RemoveArgs> = {
8383
type: 'string',
8484
default: DEFAULT_PATCH_MANIFEST_PATH,
8585
})
86-
.option('no-rollback', {
86+
.option('skip-rollback', {
8787
describe: 'Skip rolling back files before removing (only update manifest)',
8888
type: 'boolean',
8989
default: false,
@@ -97,7 +97,7 @@ export const removeCommand: CommandModule<{}, RemoveArgs> = {
9797
'Rollback and remove a patch by UUID',
9898
)
9999
.example(
100-
'$0 remove pkg:npm/[email protected] --no-rollback',
100+
'$0 remove pkg:npm/[email protected] --skip-rollback',
101101
'Remove from manifest without rolling back files',
102102
)
103103
},
@@ -116,7 +116,7 @@ export const removeCommand: CommandModule<{}, RemoveArgs> = {
116116
}
117117

118118
// First, rollback the patch if not skipped
119-
if (!argv['no-rollback']) {
119+
if (!argv['skip-rollback']) {
120120
console.log(`Rolling back patch before removal...`)
121121
const { success: rollbackSuccess, results: rollbackResults } =
122122
await rollbackPatches(
@@ -129,7 +129,7 @@ export const removeCommand: CommandModule<{}, RemoveArgs> = {
129129

130130
if (!rollbackSuccess) {
131131
console.error(
132-
'\nRollback failed. Use --no-rollback to remove from manifest without restoring files.',
132+
'\nRollback failed. Use --skip-rollback to remove from manifest without restoring files.',
133133
)
134134
process.exit(1)
135135
}

0 commit comments

Comments
 (0)