Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 0fb4825

Browse files
Merge branch 'master' into fixes/pinvoke-of-doom
2 parents 2ff9631 + 7284736 commit 0fb4825

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ public ITask InitializeRepository()
8080
var targetPath = NPath.CurrentDirectory;
8181

8282
var unityYamlMergeExec = Environment.UnityApplication.Parent.Combine("Tools", "UnityYAMLMerge");
83-
var yamlMergeCommand = $@"'{unityYamlMergeExec}' merge -p ""$BASE"" ""$REMOTE"" ""$LOCAL"" ""$MERGED""";
83+
var yamlMergeCommand = Environment.IsWindows
84+
? $@"'{unityYamlMergeExec}' merge -p ""$BASE"" ""$REMOTE"" ""$LOCAL"" ""$MERGED"""
85+
: $@"'{unityYamlMergeExec}' merge -p '$BASE' '$REMOTE' '$LOCAL' '$MERGED'";
8486

8587
var gitignore = targetPath.Combine(".gitignore");
8688
var gitAttrs = targetPath.Combine(".gitattributes");

src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,32 @@
22
using System.Collections.Generic;
33
using UnityEditor;
44
using UnityEngine;
5+
using Debug = System.Diagnostics.Debug;
56

67
namespace GitHub.Unity
78
{
89
sealed class ApplicationCache : ScriptObjectSingleton<ApplicationCache>
910
{
1011
[SerializeField] private bool firstRun = true;
12+
13+
[NonSerialized] private bool? val;
14+
1115
public bool FirstRun
1216
{
1317
get
1418
{
15-
var val = firstRun;
19+
if (!val.HasValue)
20+
{
21+
val = firstRun;
22+
}
23+
1624
if (firstRun)
1725
{
1826
firstRun = false;
1927
Save(true);
2028
}
21-
return val;
29+
30+
return val.Value;
2231
}
2332
}
2433
}

0 commit comments

Comments
 (0)