diff --git a/.github/workflows/cli-publish.yml b/.github/workflows/cli-publish.yml index 6bca8c30..7e88db40 100644 --- a/.github/workflows/cli-publish.yml +++ b/.github/workflows/cli-publish.yml @@ -72,7 +72,7 @@ jobs: - name: Determine trigger type id: trigger_type run: | - if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/cli/v* ]]; then + if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == refs/tags/cli/v* ]]; then echo "is_tag=true" >> "$GITHUB_OUTPUT" TAG_VERSION=${GITHUB_REF#refs/tags/cli/v} echo "tag_version=$TAG_VERSION" >> "$GITHUB_OUTPUT" diff --git a/visualstudio-extension/src/CopilotTokenTracker/Data/CliBridge.cs b/visualstudio-extension/src/CopilotTokenTracker/Data/CliBridge.cs index ea32b2ea..2ecb8eec 100644 --- a/visualstudio-extension/src/CopilotTokenTracker/Data/CliBridge.cs +++ b/visualstudio-extension/src/CopilotTokenTracker/Data/CliBridge.cs @@ -173,13 +173,14 @@ public static Task GetAllDataAsync() return _inflightAllTask; } - _inflightAllTask = RunGetAllDataAsync(); - _ = _inflightAllTask.ContinueWith(_ => + var task = RunGetAllDataAsync(); + _inflightAllTask = task; + _ = task.ContinueWith(_ => { lock (_allLock) { _inflightAllTask = null; } }, System.Threading.Tasks.TaskContinuationOptions.ExecuteSynchronously); - return _inflightAllTask; + return task; } }