Skip to content

Commit

Permalink
fix(dev-env): remove lando/compose/env directory when environment i…
Browse files Browse the repository at this point in the history
…s destroyed
  • Loading branch information
sjinks committed Jan 3, 2025
1 parent 8aaba52 commit c766ef2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/dev-environment/dev-environment-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import copydir from 'copy-dir';
import debugLib from 'debug';
import ejs from 'ejs';
import { prompt } from 'enquirer';
import { dockerComposify } from 'lando/lib/utils';
import fetch from 'node-fetch';
import fs from 'node:fs';
import path from 'node:path';
Expand Down Expand Up @@ -269,6 +270,14 @@ export async function destroyEnvironment(
debug( "Lando file doesn't exist, skipping lando destroy." );
}

await fs.promises.rm(
path.join( xdgDataDirectory(), 'vip', 'lando', 'compose', dockerComposify( slug ) ),

Check failure on line 274 in src/lib/dev-environment/dev-environment-core.ts

View workflow job for this annotation

GitHub Actions / Lint

Unsafe argument of type `any` assigned to a parameter of type `string`
{
force: true,
recursive: true,
}
);

if ( removeFiles ) {
await fs.promises.rm( instancePath, { recursive: true } );
console.log( `${ chalk.green( '✓' ) } Environment files deleted successfully.` );
Expand Down

0 comments on commit c766ef2

Please sign in to comment.