1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/prettier/util.ts
Yoshiya Hinosawa 0eb1a49b38 Add reusable prettier wrapper CLI (denoland/deno_std#165)
This also fixes an issue with the path on azure-pipelines.

Original: e7837ff0f0
2019-02-01 10:16:39 -05:00

12 lines
367 B
TypeScript

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { platform, run } from "deno";
// Runs a command in cross-platform way
export function xrun(opts) {
return run({
...opts,
args: platform.os === "win" ? ["cmd.exe", "/c", ...opts.args] : opts.args
});
}
export const executableSuffix = platform.os === "win" ? ".exe" : "";