From 151ce0266eb4de2c8fc600c81c192a5f791b6169 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 9 Oct 2019 17:10:09 -0400 Subject: Move everything into std subdir --- std/prettier/util.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 std/prettier/util.ts (limited to 'std/prettier/util.ts') diff --git a/std/prettier/util.ts b/std/prettier/util.ts new file mode 100644 index 000000000..b8f79005d --- /dev/null +++ b/std/prettier/util.ts @@ -0,0 +1,10 @@ +// Copyright 2018-2019 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 + }); +} -- cgit v1.2.3