We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84e3748 commit f6fa1b0Copy full SHA for f6fa1b0
src/path.ts
@@ -4,7 +4,6 @@ import path from 'node:path/posix'
4
import { env, version } from 'vscode'
5
6
import { name as bakExt } from './generated/meta'
7
-import { log } from './logger'
8
import { logError } from './utils'
9
10
function getDirectoryName(filePath: string): string {
src/uninstall.ts
@@ -1,9 +1,12 @@
1
+import fs from 'node:fs'
2
import { readFileSync, writeFileSync } from 'atomically'
3
import * as paths from './path'
function uninstall(srcPath: string, bakPath: string) {
- writeFileSync(srcPath, readFileSync(bakPath, 'utf-8'))
+ if (fs.existsSync(srcPath)) {
+ writeFileSync(srcPath, readFileSync(bakPath, 'utf-8'))
+ }
}
11
12
uninstall(
0 commit comments