mirror of
https://github.com/denoland/deno.git
synced 2024-11-01 09:24:20 -04:00
13 lines
367 B
TypeScript
13 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" : "";
|