summaryrefslogtreecommitdiff
path: root/std/prettier/util.ts
blob: 0d3b01252e551934478c11f5faa61b467fde3776 (plain)
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
const { build, run } = Deno;

// Runs a command in cross-platform way
export function xrun(opts: Deno.RunOptions): Deno.Process {
  return run({
    ...opts,
    args: build.os === "win" ? ["cmd.exe", "/c", ...opts.args] : opts.args
  });
}