1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 01:29:14 -05:00
denoland-deno/prettier/util.ts
2019-03-04 19:53:35 -05:00

12 lines
375 B
TypeScript

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