Skip to content

Commit

Permalink
fix: verbose output when running setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
theoludwig committed Oct 15, 2022
1 parent 1dfb32b commit 57b6637
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/e2e/tests/2-update.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import fs from 'node:fs'
import path from 'node:path'

import tap from 'tap'
import { execa } from 'execa'

Expand All @@ -6,6 +9,10 @@ import { LeonInstance } from '../../services/LeonInstance.js'
export const test2Update = async (): Promise<void> => {
await tap.test('leon update', async (t) => {
const leonInstance = await LeonInstance.get()
await fs.promises.rm(path.join(leonInstance.path, '.env'), {
recursive: true,
force: true
})
let oldVersion = await leonInstance.getVersion()
const leonUpdateWithSameVersion = await execa('leon', ['update'])
let newVersion = await leonInstance.getVersion()
Expand Down
5 changes: 4 additions & 1 deletion src/services/LeonInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,16 @@ export class LeonInstance implements LeonInstanceOptions {

public async install(): Promise<void> {
await this.runScript({
command: 'npm install',
command: 'npm install --ignore-scripts=true',
workingDirectory: this.path,
loader: {
message: 'Installing npm dependencies',
stderr: 'Could not install the npm dependencies'
}
})
process.chdir(this.path)
const command = 'npm run postinstall'
await execaCommand(command, { stdio: 'inherit' })
}

static async find(name: string): Promise<LeonInstance | null> {
Expand Down

0 comments on commit 57b6637

Please sign in to comment.