Skip to content

Commit 0e2015a

Browse files
committed
fix agent not autoupdating on OSX
1 parent 9fd257e commit 0e2015a

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

ArduinoCreateAgent_autoupdate.xml

+13-6
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,25 @@
280280
</platformTest>
281281
</ruleList>
282282
</runProgram>
283-
<xmlFileSet>
284-
<attribute>AbandonProcessGroup</attribute>
285-
<element></element>
286-
<file>/Users/${system_username}/Library/LaunchAgents/${product_shortname}.plist</file>
287-
<value>true</value>
283+
<substitute>
284+
<files>/Users/${system_username}/Library/LaunchAgents/${product_shortname}.plist</files>
285+
<type>exact</type>
288286
<ruleList>
289287
<osxServiceTest>
290288
<condition>exists</condition>
291289
<service>${product_shortname}</service>
292290
</osxServiceTest>
293291
</ruleList>
294-
</xmlFileSet>
292+
<substitutionList>
293+
<substitution>
294+
<pattern>&lt;key&gt;RunAtLoad&lt;/key&gt;</pattern>
295+
<value>
296+
&lt;key&gt;RunAtLoad&lt;/key&gt;
297+
&lt;true/&gt;
298+
&lt;key&gt;AbandonProcessGroup&lt;/key&gt;</value>
299+
</substitution>
300+
</substitutionList>
301+
</substitute>
295302
</postInstallationActionList>
296303
<preUninstallationActionList>
297304
<deleteOSXService>

hub.go

+2
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ func restart(path string) {
301301
} else {
302302
exePath = path
303303
}
304+
305+
exePath = strings.Trim(exePath, "\n")
304306
// figure out garbageCollection flag
305307
//isGcFlag := "false"
306308

0 commit comments

Comments
 (0)