From 0c9a109761c2fcd7d8137ce4eff185ca1e7a9c85 Mon Sep 17 00:00:00 2001 From: Yunfei Hao Date: Wed, 8 Jan 2020 19:30:47 +0800 Subject: [PATCH] [tfjs-core] fix building exception on Windows ISSUE fixes #2654 --- tfjs-core/package.json | 2 +- tfjs-core/scripts/enumerate-tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tfjs-core/package.json b/tfjs-core/package.json index 598b3aec40a..66e3ae779e8 100644 --- a/tfjs-core/package.json +++ b/tfjs-core/package.json @@ -53,7 +53,7 @@ }, "scripts": { "build-ci": "./scripts/enumerate-tests.js --ci && tsc && yarn build-test-snippets", - "build": "./scripts/enumerate-tests.js && tsc", + "build": "node ./scripts/enumerate-tests.js && tsc", "build-npm": "./scripts/build-npm.sh", "build:bazel": "bazel build //...", "build-test-snippets": "yarn tsc --project ./scripts/test_snippets/tsconfig.json", diff --git a/tfjs-core/scripts/enumerate-tests.js b/tfjs-core/scripts/enumerate-tests.js index dad7c96a345..26b00019b45 100755 --- a/tfjs-core/scripts/enumerate-tests.js +++ b/tfjs-core/scripts/enumerate-tests.js @@ -44,7 +44,7 @@ const AUTOGEN_CLAUSE = `///// DO NOT EDIT: This file is auto-generated by ` + `; const fs = require('fs'); -const path = require('path'); +const path = require('path').posix; const argv = require('yargs').argv; function findTestFiles(dir, files) {