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

Commit 269efe9

Browse files
authored
fix prebuild, setting sketch, language ext issue (#557)
1 parent 3cd28c2 commit 269efe9

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-arduino",
33
"displayName": "Arduino",
44
"description": "Arduino for Visual Studio Code",
5-
"version": "0.2.15-rc",
5+
"version": "0.2.15-rc2",
66
"publisher": "vsciot-vscode",
77
"aiKey": "83dd2c27-6594-41d3-85a9-bdb22070eb42",
88
"preview": true,
@@ -471,8 +471,9 @@
471471
"mimetypes": [
472472
"text/x-code-output"
473473
]
474-
}, {
475-
"id": "arduino",
474+
},
475+
{
476+
"id": "cpp",
476477
"extensions": [
477478
".ino"
478479
],

src/deviceContext.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export class DeviceContext implements IDeviceContext, vscode.Disposable {
249249
}
250250

251251
public get prebuild() {
252-
return this._prebuild.trim();
252+
return this._prebuild.trim ? this._prebuild.trim() : "";
253253
}
254254

255255
public get output() {

src/extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export async function activate(context: vscode.ExtensionContext) {
177177
const newSketchFileName = await vscode.window.showInputBox({
178178
placeHolder: sketchFileName,
179179
validateInput: (value) => {
180-
if (value && /^\w+\.((ino)|(cpp)|c)$/.test(value.trim())) {
180+
if (value && /\.((ino)|(cpp)|c)$/.test(value.trim())) {
181181
return null;
182182
} else {
183183
return "Invalid sketch file name. Should be *.ino/*.cpp/*.c";

0 commit comments

Comments
 (0)