--- a/src/Tools/VSCode/extension/src/extension.ts Mon Feb 28 14:29:23 2022 +0100
+++ b/src/Tools/VSCode/extension/src/extension.ts Mon Feb 28 14:53:52 2022 +0100
@@ -1,6 +1,6 @@
'use strict';
-import * as path from 'path'
+import * as platform from './platform'
import * as library from './library'
import * as decorations from './decorations'
import * as preview_panel from './preview_panel'
@@ -34,7 +34,7 @@
.concat(roots.length > 0 && workspace_dir !== undefined ? ["-D", workspace_dir] : [])
const server_options: ServerOptions =
- library.platform_is_windows() ?
+ platform.is_windows() ?
{ command: library.getenv_strict("CYGWIN_ROOT") + "\\bin\\bash",
args: ["-l", isabelle_tool, "vscode_server"].concat(isabelle_args) } :
{ command: isabelle_tool,
--- a/src/Tools/VSCode/extension/src/library.ts Mon Feb 28 14:29:23 2022 +0100
+++ b/src/Tools/VSCode/extension/src/library.ts Mon Feb 28 14:53:52 2022 +0100
@@ -1,6 +1,5 @@
'use strict';
-import * as os from 'os'
import {TextEditor, Uri, ViewColumn, window, workspace} from 'vscode'
import {Isabelle_Workspace} from './isabelle_filesystem/isabelle_workspace'
@@ -46,14 +45,6 @@
}
-/* platform information */
-
-export function platform_is_windows(): boolean
-{
- return os.type().startsWith("Windows")
-}
-
-
/* files */
export function is_file(uri: Uri): boolean
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/VSCode/extension/src/platform.ts Mon Feb 28 14:53:52 2022 +0100
@@ -0,0 +1,26 @@
+'use strict';
+
+import * as os from 'os'
+
+
+/* platform family */
+
+export function is_windows(): boolean
+{
+ return os.type().startsWith("Windows")
+}
+
+export function is_linux(): boolean
+{
+ return os.type().startsWith("Linux")
+}
+
+export function is_macos(): boolean
+{
+ return os.type().startsWith("Darwin")
+}
+
+export function is_unix(): boolean
+{
+ return is_linux() || is_macos()
+}