Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/buildtool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface RunBuildOptions {
}

export function generateCommand(options: RunBuildOptions): string {
const pluginsPath = path.join(__dirname,"plugins").replace("'","''");

@davidbuzinski davidbuzinski Sep 4, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: why did we need this in the first place? In case the repo name or agent workspace has a single quote in it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, because this path is being injected into a MATLAB char array.

const pluginsPath = path.join(__dirname,"plugins").replace(/'/g,"''");
Comment thread
davidbuzinski marked this conversation as resolved.
Outdated
let command: string = "addpath('"+ pluginsPath +"'); buildtool"
if (options.Tasks) {
command = command + " " + options.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/buildtool.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as path from "path";
import * as buildtool from "./buildtool";

describe("command generation", () => {
const command = "addpath('"+ path.join(__dirname, "plugins").replace("'","''") +"'); buildtool"
const command = "addpath('"+ path.join(__dirname, "plugins").replace(/'/g,"''") +"'); buildtool"
it("buildtool invocation with unspecified tasks and build options", () => {
const options: buildtool.RunBuildOptions = {
Tasks: "",
Expand Down
Loading