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

fix usb-detection bug and update travis ci script #996

Merged
merged 6 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ before_install:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
brew cask install arduino;
fi

install:
- npm install -g vsce
- npm install -g node-gyp
- npm install -g typescript
- npm install -g gulp

install:
- npm install
# https://github.com/travis-ci/travis-ci/issues/8813
- rm -f ./node_modules/.bin/which
Expand Down
123 changes: 120 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@
"gulp-typescript": "^5.0.1",
"minimist": "^1.2.0",
"mocha": "^6.2.2",
"node-gyp": "^6.1.0",
"plugin-error": "^1.0.1",
"tslint": "^5.20.1",
"typemoq": "^1.6.0",
Expand All @@ -580,7 +581,7 @@
"iconv-lite": "^0.4.18",
"impor": "^0.1.1",
"properties": "^1.2.1",
"usb-native": "^5.0.7",
"usb-native": "^5.0.12",
"uuid": "^3.0.1",
"vscode-extension-telemetry": "0.0.18",
"winreg": "^1.2.3",
Expand Down
9 changes: 6 additions & 3 deletions src/serialmonitor/usbDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,13 @@ export class UsbDetector {
}
}

private showReadMeAndExample(readme: string) {
private showReadMeAndExample(readme: string|undefined) {
if (ArduinoContext.boardManager.currentBoard) {
let readmeFilePath = path.join(ArduinoContext.boardManager.currentBoard.platform.rootBoardPath, readme);
if (!util.fileExistsSync(readmeFilePath)) {
let readmeFilePath = "";
if (readme) {
readmeFilePath = path.join(ArduinoContext.boardManager.currentBoard.platform.rootBoardPath, readme);
}
if (!readmeFilePath || !util.fileExistsSync(readmeFilePath)) {
readmeFilePath = path.join(ArduinoContext.boardManager.currentBoard.platform.rootBoardPath, "README.md");
}
vscode.commands.executeCommand("arduino.showExamples", true);
Expand Down