Skip to content

Commit

Permalink
fix: Remove ' in cargo module commands (#78)
Browse files Browse the repository at this point in the history
On Windows, Node.js uses cmd.exe as a shell, which doesn't treat single quotes as string delimiters.
  • Loading branch information
fuzzypixelz authored Apr 3, 2024
1 parent dc336c4 commit c678543
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/build-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128206,7 +128206,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = command_sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = command_sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/build-crates-standalone-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128205,7 +128205,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/bump-crates-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82064,7 +82064,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = command_sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = command_sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/publish-crates-cargo-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82064,7 +82064,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = command_sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = command_sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/publish-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128228,7 +128228,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/publish-crates-eclipse-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128225,7 +128225,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/publish-crates-github-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128206,7 +128206,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion dist/publish-crates-homebrew-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128227,7 +128227,7 @@ const gitEnv = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
function cargo_packages(path) {
const metadataContents = sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents);
const result = [];
for (const elem of metadata.packages) {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type CargoMetadata = {
* @returns The list of Cargo packages present in the workspace or crate.
*/
export function packages(path: string): Package[] {
const metadataContents = sh("cargo metadata --no-deps --format-version '1'", { cwd: path });
const metadataContents = sh("cargo metadata --no-deps --format-version=1", { cwd: path });
const metadata = JSON.parse(metadataContents) as CargoMetadata;

const result = [] as Package[];
Expand Down

0 comments on commit c678543

Please # to comment.