Skip to content

Commit 2801e0f

Browse files
authored
fs.readFileSync(filename, 'utf8') doesn't strip BOM markers (#580)
Taking the workaround specified here nodejs/node-v0.x-archive#1918
1 parent e2d7c12 commit 2801e0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/assets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function addTasksJsonIfNecessary(info: protocol.DotNetWorkspaceInformation, path
243243

244244
function hasWebServerDependency(projectJsonPath: string) {
245245
let projectJson = fs.readFileSync(projectJsonPath, 'utf8');
246-
let projectJsonObject = JSON.parse(projectJson);
246+
let projectJsonObject = JSON.parse(projectJson.replace(/^\uFEFF/, ''));
247247

248248
if (projectJsonObject == null) {
249249
return false;

0 commit comments

Comments
 (0)