Skip to content
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
2 changes: 1 addition & 1 deletion src/input/findConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const findConfiguration = async <Configuration>(
command: string,
config: string,
): Promise<DeepPartial<Configuration> | Error> => {
const fullCommand = `${command} ${config}`;
const fullCommand = `${command} "${config}"`;
const stdout = await execAndCatch(exec, fullCommand);

if (stdout instanceof Error) {
Expand Down
4 changes: 2 additions & 2 deletions src/input/findESLintConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("findESLintConfiguration", () => {
await findESLintConfiguration(dependencies, createStubRawSettings());

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith("eslint --print-config ./eslintrc.js");
expect(dependencies.exec).toHaveBeenLastCalledWith(`eslint --print-config "./eslintrc.js"`);
});

it("includes a configuration file in the ESLint command when one is provided", async () => {
Expand All @@ -48,7 +48,7 @@ describe("findESLintConfiguration", () => {

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith(
"eslint --print-config ./custom/eslintrc.js",
`eslint --print-config "./custom/eslintrc.js"`,
);
});

Expand Down
4 changes: 2 additions & 2 deletions src/input/findPackagesConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("findPackagesConfiguration", () => {
await findPackagesConfiguration(dependencies, undefined);

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith("cat ./package.json");
expect(dependencies.exec).toHaveBeenLastCalledWith(`cat "./package.json"`);
});

it("includes a configuration file in the packages command when one is provided", async () => {
Expand All @@ -22,7 +22,7 @@ describe("findPackagesConfiguration", () => {
await findPackagesConfiguration(dependencies, config);

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith("cat ./custom/package.json");
expect(dependencies.exec).toHaveBeenLastCalledWith(`cat "./custom/package.json"`);
});

it("applies packages defaults when none are provided", async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/input/findTslintConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("findTSLintConfiguration", () => {
await findTSLintConfiguration(dependencies, undefined);

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith("tslint --print-config ./tslint.json");
expect(dependencies.exec).toHaveBeenLastCalledWith(`tslint --print-config "./tslint.json"`);
});

it("includes a configuration file in the TSLint command when one is provided", async () => {
Expand All @@ -39,7 +39,7 @@ describe("findTSLintConfiguration", () => {

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith(
"tslint --print-config ./custom/tslint.json",
`tslint --print-config "./custom/tslint.json"`,
);
});

Expand Down
4 changes: 2 additions & 2 deletions src/input/findTypeScriptConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("findTypeScriptConfiguration", () => {
await findTypeScriptConfiguration(dependencies, undefined);

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith("cat ./tsconfig.json");
expect(dependencies.exec).toHaveBeenLastCalledWith(`cat "./tsconfig.json"`);
});

it("includes a configuration file in the TypeScript command when one is provided", async () => {
Expand All @@ -38,7 +38,7 @@ describe("findTypeScriptConfiguration", () => {
await findTypeScriptConfiguration(dependencies, config);

// Assert
expect(dependencies.exec).toHaveBeenLastCalledWith("cat ./custom/tsconfig.json");
expect(dependencies.exec).toHaveBeenLastCalledWith(`cat "./custom/tsconfig.json"`);
});

it("applies TypeScript defaults when none are provided", async () => {
Expand Down