提交 1efc4735 编写于 作者: B Benjamin Pasero

fix #49553

上级 d9299d95
......@@ -171,7 +171,7 @@ export class ConfigWatcher<T> implements IConfigWatcher<T>, IDisposable {
// Windows: in some cases the filename contains artifacts from the absolute path
// see https://github.com/nodejs/node/issues/19170
// As such, we have to ensure that the filename basename is used for comparison.
if (isWindows && filename !== this.configName) {
if (isWindows && filename && filename !== this.configName) {
filename = basename(filename);
}
......
......@@ -620,7 +620,7 @@ function normalizePath(path: string): string {
return strings.rtrim(paths.normalize(path), paths.sep);
}
export function watch(path: string, onChange: (type: string, path: string) => void, onError: (error: string) => void): fs.FSWatcher {
export function watch(path: string, onChange: (type: string, path?: string) => void, onError: (error: string) => void): fs.FSWatcher {
try {
const watcher = fs.watch(path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册