Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make lm:setup test pass #5980

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commands/lm/lm-setup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const configureLFSURL = async function (siteId, api) {
* @param {import('../base-command.mjs').default} command
*/
const lmSetup = async (options, command) => {
if (!options.force && !options.f) {
if (!options.force) {
const { wantsToProceed } = await inquirer.prompt({
type: 'confirm',
name: 'wantsToProceed',
Expand Down Expand Up @@ -115,5 +115,6 @@ 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)
2 changes: 1 addition & 1 deletion tests/integration/commands/lm/lm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('lm command', () => {
})

test<FixtureTestContext>('netlify lm:setup', async ({ fixture }) => {
const cliResponse = await fixture.callCli(['lm:setup'], { offline: false, execOptions })
const cliResponse = await fixture.callCli(['lm:setup', '--force'], { 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]')
Expand Down