Skip to content

Commit

Permalink
style: format update
Browse files Browse the repository at this point in the history
  • Loading branch information
telesoho committed May 3, 2023
1 parent 521aa81 commit a9e6996
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/clipboard/wsl.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { fileURLToPath, URL } from "node:url";
import { ClipboardType, IClipboard } from "../clipboard_interface";
import { getShell, runCommand } from "../os";
import * as path from "path";
import * as path from "path";
import { stripFinalNewline } from "../utils";

async function pathToWin(path: string): Promise<string> {
const newPath = await runCommand("wslpath", ["-m", path]);
return stripFinalNewline(newPath);
}

async function pathToUnix (path: string): Promise<string> {
async function pathToUnix(path: string): Promise<string> {
const newPath = await runCommand("wslpath", ["-u", path]);
return stripFinalNewline(newPath);
}
Expand Down
5 changes: 2 additions & 3 deletions src/os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class Win10Shell implements IShell {
}
}


class Win32Shell implements IShell {
getClipboard(): IClipboard {
return new Win32Clipboard();
Expand All @@ -146,13 +145,13 @@ class Win32Shell implements IShell {
}
}


class WslShell implements IShell {
getClipboard(): IClipboard {
return new WslClipboard();
}
async runScript(script: string, parameters: string[]): Promise<string> {
const shell = "/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe";
const shell =
"/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe";
const command = [
"-noprofile",
"-noninteractive",
Expand Down

0 comments on commit a9e6996

Please sign in to comment.