From 4f0cd53fd0b94b0aea8eaed2473dab1fabdfd4cc Mon Sep 17 00:00:00 2001 From: Kaelig Deloumeau-Prigent Date: Tue, 5 Sep 2023 07:18:25 -0700 Subject: [PATCH] chore: remove prompt at the beginning of lm:setup (#5976) Co-authored-by: Simon Knott --- src/commands/lm/lm-setup.mjs | 17 +---------------- tests/integration/commands/lm/lm.test.ts | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/commands/lm/lm-setup.mjs b/src/commands/lm/lm-setup.mjs index f795089b930..c9ca57030b7 100644 --- a/src/commands/lm/lm-setup.mjs +++ b/src/commands/lm/lm-setup.mjs @@ -1,8 +1,7 @@ // @ts-check -import inquirer from 'inquirer' import Listr from 'listr' -import { error, exit } from '../../utils/command-helpers.mjs' +import { error } from '../../utils/command-helpers.mjs' import execa from '../../utils/execa.mjs' import { installPlatform } from '../../utils/lm/install.mjs' import { checkHelperVersion } from '../../utils/lm/requirements.mjs' @@ -57,19 +56,6 @@ const configureLFSURL = async function (siteId, api) { * @param {import('../base-command.mjs').default} command */ const lmSetup = async (options, command) => { - if (!options.force) { - const { wantsToProceed } = await inquirer.prompt({ - type: 'confirm', - name: 'wantsToProceed', - message: - 'Large media is a deprecated feature and will be removed in a future version. Are you sure you want to continue? (to skip this prompt, pass a --force flag)', - default: false, - }) - if (!wantsToProceed) { - exit() - } - } - await command.authenticate() const { api, site } = command.netlify @@ -115,6 +101,5 @@ export const createLmSetupCommand = (program) => .description('Configures your site to use Netlify Large Media') .option('-s, --skip-install', 'Skip the credentials helper installation check') .option('-f, --force-install', 'Force the credentials helper installation') - .option('--force', 'Skip deprecation check') .addHelpText('after', 'It runs the install command if you have not installed the dependencies yet.') .action(lmSetup) diff --git a/tests/integration/commands/lm/lm.test.ts b/tests/integration/commands/lm/lm.test.ts index 6bfe2328b42..0123f8dc27e 100644 --- a/tests/integration/commands/lm/lm.test.ts +++ b/tests/integration/commands/lm/lm.test.ts @@ -91,7 +91,7 @@ describe('lm command', () => { }) test('netlify lm:setup', async ({ fixture }) => { - const cliResponse = await fixture.callCli(['lm:setup', '--force'], { offline: false, execOptions }) + const cliResponse = await fixture.callCli(['lm:setup'], { offline: false, execOptions }) expect(cliResponse).toContain('Provisioning Netlify Large Media [started]') expect(cliResponse).toContain('Provisioning Netlify Large Media [completed]') expect(cliResponse).toContain('Configuring Git LFS for this site [started]')