Skip to content

Commit 4d1d988

Browse files
committed
fix: try to fix failure to remove build dir on linux
1 parent b6bf67f commit 4d1d988

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bin/destroy.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ export async function main(args: string[]): Promise<void> {
1616
if (argv._.length) {
1717
artifactPath = argv._[0]
1818
}
19-
20-
const propsPath = path.resolve(
21-
process.cwd(),
22-
artifactPath,
23-
'.adapterprops.json'
24-
)
19+
20+
const absArtifactPath = path.resolve(process.cwd(), artifactPath)
21+
const propsPath = path.join(absArtifactPath, '.adapterprops.json')
2522

2623
const require = createRequire(import.meta.url)
2724
let adapterProps: AWSAdapterProps
@@ -42,7 +39,7 @@ export async function main(args: string[]): Promise<void> {
4239
env: process.env,
4340
})
4441

45-
fs.rmSync(artifactPath, { recursive: true, force: true })
42+
fs.rmSync(absArtifactPath, { recursive: true, force: true })
4643

4744
}
4845

0 commit comments

Comments
 (0)