diff options
Diffstat (limited to 'prettier/util.ts')
| -rw-r--r-- | prettier/util.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/prettier/util.ts b/prettier/util.ts new file mode 100644 index 000000000..179be444b --- /dev/null +++ b/prettier/util.ts @@ -0,0 +1,12 @@ +// 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" : ""; |
