@just-every/manager 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/justevery-manager.js +4 -1
- package/lib/installer.js +3 -2
- package/package.json +1 -1
package/bin/justevery-manager.js
CHANGED
|
@@ -5,7 +5,10 @@ import { platform as osPlatform } from 'os';
|
|
|
5
5
|
const args = process.argv.slice(2);
|
|
6
6
|
const wantsHelp = args.includes('--help') || args.includes('-h');
|
|
7
7
|
const skipLaunchEnv = process.env.JE_AGENT_SKIP_LAUNCH === '1' || process.env.JE_MANAGER_SKIP_LAUNCH === '1';
|
|
8
|
-
const
|
|
8
|
+
const sessionType = (process.env.XDG_SESSION_TYPE || '').toLowerCase();
|
|
9
|
+
const hasDisplay = Boolean(process.env.DISPLAY || process.env.WAYLAND_DISPLAY);
|
|
10
|
+
const hasGuiSession = hasDisplay || (Boolean(sessionType) && sessionType !== 'tty');
|
|
11
|
+
const isHeadlessLinux = osPlatform() === 'linux' && !hasGuiSession;
|
|
9
12
|
const downloadOnly = args.includes('--download-only') || args.includes('--no-open') || skipLaunchEnv || isHeadlessLinux;
|
|
10
13
|
const printPath = args.includes('--print-path');
|
|
11
14
|
|
package/lib/installer.js
CHANGED
|
@@ -322,8 +322,9 @@ function shouldSkipLaunch() {
|
|
|
322
322
|
}
|
|
323
323
|
if (osPlatform() !== 'linux') return false;
|
|
324
324
|
const hasDisplay = Boolean(process.env.DISPLAY || process.env.WAYLAND_DISPLAY);
|
|
325
|
-
const
|
|
326
|
-
|
|
325
|
+
const sessionType = (process.env.XDG_SESSION_TYPE || '').toLowerCase();
|
|
326
|
+
const hasGuiSession = hasDisplay || (Boolean(sessionType) && sessionType !== 'tty');
|
|
327
|
+
return !hasGuiSession;
|
|
327
328
|
}
|
|
328
329
|
|
|
329
330
|
export async function resolveAgentVersion() {
|