1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 17:49:08 -05:00
denoland-deno/prettier/util.ts

13 lines
375 B
TypeScript
Raw Normal View History

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
const { platform, run } = Deno;
// Runs a command in cross-platform way
2019-03-04 19:53:35 -05:00
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" : "";