chore(developer): remove '--rename' option from kmc-copy

An in-place rename is dangerous and destructive, so we won't support it.
This commit is contained in:
Marc Durdin 2025-01-22 08:12:54 +07:00
parent 6372fe8f5e
commit 439ea0e4d1
3 changed files with 0 additions and 10 deletions

View file

@ -29,11 +29,6 @@ export interface CopierOptions /* not inheriting from CompilerBaseOptions */ {
* output path where project folder will be created
*/
outPath: string;
/*
* TODO-COPY rename: rename existing files rather than copy
rename: boolean;
*/
/**
* dryRun: show what would happen
*/

View file

@ -306,7 +306,6 @@ describe('KeymanProjectCopier', function() {
assert.isTrue(await copier.init(callbacks, {
dryRun: false,
outPath,
// TODO-COPY rename: false,
}));
const result = await copier.run(fullSource);
@ -370,7 +369,6 @@ describe('KeymanProjectCopier', function() {
assert.isTrue(await copier.init(callbacks, {
dryRun: false,
outPath,
// TODO-COPY rename: false,
}));
// armenian_mnemonic selected because (a) small, and (b) has v2.0 project, so
@ -400,7 +398,6 @@ describe('KeymanProjectCopier', function() {
assert.isTrue(await copier.init(callbacks, {
dryRun: false,
outPath,
// TODO-COPY rename: false,
}));
const result = await copier.run('cloud:'+id);

View file

@ -19,7 +19,6 @@ export function declareCopy(program: Command) {
command
.description('Copy a Keyman keyboard or lexical model project')
.option('-o, --out-path <path>', 'New name and path for project')
// TODO-COPY .option('-r, --rename', 'Rename instead of copying project')
.option('-n, --dry-run', 'Show what would happen, without making changes')
.action(copyProject)
.addHelpText('before', `
@ -36,7 +35,6 @@ export function declareCopy(program: Command) {
function commanderOptionsToCopierOptions(options: any): CopierOptions {
const result: CopierOptions = {
outPath: options.outPath,
// TODO-COPY rename: options.rename ?? false,
dryRun: options.dryRun ?? false,
};
return result;