Skip to content

Commit

Permalink
only support freedesktop autostart, if autostartCmd property is expli…
Browse files Browse the repository at this point in the history
…citly set
  • Loading branch information
infeo committed Aug 16, 2024
1 parent e298ba5 commit a2c0353
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ public FreedesktopAutoStartService() {
var xdgConfigDirString = Objects.requireNonNullElse(System.getenv("XDG_CONFIG_HOME"), System.getProperty("user.home") + "/.config");
this.autostartFile = Path.of(xdgConfigDirString, "autostart", AUTOSTART_FILENAME);

var execValue = System.getProperty(CMD_PROPERTY);
if (execValue == null) {
LOG.debug("JVM property {} not set, using command path", CMD_PROPERTY);
execValue = ProcessHandle.current().info().command().orElse("");
}
var execValue = System.getProperty(CMD_PROPERTY,"");
this.hasExecValue = !execValue.isBlank();
this.content = CONTENT_TEMPLATE.formatted(execValue, this.getClass().getName());
}
Expand Down

0 comments on commit a2c0353

Please sign in to comment.