You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Original code was copied 2021-08-22 from https://github.com/phibr0/obsidian-open-with/blob/84f0e25ba8e8355ff83b22f4050adde4cc6763ea/main.ts#L66-L67
@@ -17,6 +20,18 @@ export function isWindows() {
17
20
returnprocess.platform==="win32";
18
21
}
19
22
23
+
/**
24
+
* This is just a wrapper around platform() in order to cast the type to PlatformId.
25
+
* TODO: Consider renaming this to getPlatformId().
26
+
*/
27
+
exportfunctiongetOperatingSystem(): PlatformId{
28
+
// @ts-ignore In theory, platform() can return an OS name not included in OperatingSystemName. But as Obsidian
29
+
// currently does not support anything else than Windows, Mac and Linux (except mobile platforms, but they are
30
+
// ruled out by the manifest of this plugin), it should be safe to assume that the current OS is one of those
console.log("Migrating shell command #"+shell_command_id+": shell_command string will be moved to platforms.default: "+shell_command_configuration.shell_command);
// If supported_shell_path (e.g. /bin/bash or CMD.EXE) ends with shell_file_name (e.g. bash, derived from /bin/bash or CMD.EXE, derived from C:\System32\CMD.EXE), then the shell can be considered to be supported.
0 commit comments