--- a/src/Tools/VSCode/extension/src/extension.ts Tue May 30 11:54:53 2017 +0200
+++ b/src/Tools/VSCode/extension/src/extension.ts Tue May 30 14:21:42 2017 +0200
@@ -3,7 +3,6 @@
import { ExtensionContext, workspace, window } from 'vscode';
import * as path from 'path';
import * as fs from 'fs';
-import * as os from 'os';
import * as library from './library'
import * as decorations from './decorations';
import * as preview from './preview';
@@ -16,8 +15,6 @@
export function activate(context: ExtensionContext)
{
- const is_windows = os.type().startsWith("Windows")
-
const isabelle_home = library.get_configuration<string>("home")
const isabelle_args = library.get_configuration<Array<string>>("args")
const cygwin_root = library.get_configuration<string>("cygwin_root")
@@ -32,7 +29,7 @@
const standard_args = ["-o", "vscode_unicode_symbols", "-o", "vscode_pide_extensions"]
const server_options: ServerOptions =
- is_windows ?
+ library.platform_is_windows() ?
{ command:
(cygwin_root === "" ? path.join(isabelle_home, "contrib", "cygwin") : cygwin_root) +
"/bin/bash",
--- a/src/Tools/VSCode/extension/src/library.ts Tue May 30 11:54:53 2017 +0200
+++ b/src/Tools/VSCode/extension/src/library.ts Tue May 30 14:21:42 2017 +0200
@@ -1,8 +1,17 @@
'use strict';
+import * as os from 'os';
import { ViewColumn, TextEditor, workspace } from 'vscode'
+/* platform information */
+
+export function platform_is_windows(): boolean
+{
+ return os.type().startsWith("Windows")
+}
+
+
/* Isabelle configuration */
export function get_configuration<T>(name: string): T