summaryrefslogtreecommitdiff
path: root/prettier/util.ts
blob: 0be583f757e7c5bc7142a0f1533ff690ba32447b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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) {
  return run({
    ...opts,
    args: platform.os === "win" ? ["cmd.exe", "/c", ...opts.args] : opts.args
  });
}

export const executableSuffix = platform.os === "win" ? ".exe" : "";