Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit c63c2f4

Browse files
authored
Merge pull request #996 from microsoft/fix-serialport
fix usb-detection bug and update travis ci script
2 parents 5e71e5d + e37aa07 commit c63c2f4

File tree

4 files changed

+130
-11
lines changed

4 files changed

+130
-11
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ before_install:
4747
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
4848
brew cask install arduino;
4949
fi
50-
51-
install:
5250
- npm install -g vsce
53-
- npm install -g node-gyp
5451
- npm install -g typescript
55-
- npm install -g gulp
52+
53+
install:
5654
- npm install
5755
# https://github.com/travis-ci/travis-ci/issues/8813
5856
- rm -f ./node_modules/.bin/which

package-lock.json

Lines changed: 120 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@
564564
"gulp-typescript": "^5.0.1",
565565
"minimist": "^1.2.0",
566566
"mocha": "^6.2.2",
567+
"node-gyp": "^6.1.0",
567568
"plugin-error": "^1.0.1",
568569
"tslint": "^5.20.1",
569570
"typemoq": "^1.6.0",
@@ -580,7 +581,7 @@
580581
"iconv-lite": "^0.4.18",
581582
"impor": "^0.1.1",
582583
"properties": "^1.2.1",
583-
"usb-native": "^5.0.7",
584+
"usb-native": "^5.0.12",
584585
"uuid": "^3.0.1",
585586
"vscode-extension-telemetry": "0.0.18",
586587
"winreg": "^1.2.3",

src/serialmonitor/usbDetector.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,13 @@ export class UsbDetector {
160160
}
161161
}
162162

163-
private showReadMeAndExample(readme: string) {
163+
private showReadMeAndExample(readme: string|undefined) {
164164
if (ArduinoContext.boardManager.currentBoard) {
165-
let readmeFilePath = path.join(ArduinoContext.boardManager.currentBoard.platform.rootBoardPath, readme);
166-
if (!util.fileExistsSync(readmeFilePath)) {
165+
let readmeFilePath = "";
166+
if (readme) {
167+
readmeFilePath = path.join(ArduinoContext.boardManager.currentBoard.platform.rootBoardPath, readme);
168+
}
169+
if (!readmeFilePath || !util.fileExistsSync(readmeFilePath)) {
167170
readmeFilePath = path.join(ArduinoContext.boardManager.currentBoard.platform.rootBoardPath, "README.md");
168171
}
169172
vscode.commands.executeCommand("arduino.showExamples", true);

0 commit comments

Comments
 (0)