Skip to content

Commit 0870811

Browse files
committed
Make a windows version of the directory paths available
1 parent 02abd79 commit 0870811

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.github/actions/src/info/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ export function processRawPackages(topoOrder: string[], packages: Record<string,
113113
packageInfo.package.devDependencies !== undefined &&
114114
'playwright' in packageInfo.package.devDependencies;
115115

116+
const windowsDirectory = packageInfo.directory.split(pathlib.sep).join(pathlib.win32.sep);
117+
116118
if (
117119
packageName !== '@sourceacademy/modules' &&
118120
packageName !== '@sourceacademy/bundles' &&
@@ -130,6 +132,7 @@ export function processRawPackages(topoOrder: string[], packages: Record<string,
130132
[packageName]: {
131133
changes: packageInfo.hasChanges,
132134
directory: packageInfo.directory,
135+
windowsDirectory,
133136
name: packageName,
134137
needsPlaywright,
135138
bundleName: baseName,
@@ -141,6 +144,7 @@ export function processRawPackages(topoOrder: string[], packages: Record<string,
141144
[packageName]: {
142145
changes: packageInfo.hasChanges,
143146
directory: packageInfo.directory,
147+
windowsDirectory,
144148
name: packageName,
145149
needsPlaywright,
146150
tabName: baseName,
@@ -154,6 +158,7 @@ export function processRawPackages(topoOrder: string[], packages: Record<string,
154158
[packageName]: {
155159
changes: packageInfo.hasChanges,
156160
directory: packageInfo.directory,
161+
windowsDirectory,
157162
name: packageName,
158163
needsPlaywright
159164
}

.github/actions/src/info/utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ interface BasePackageRecord {
1313
* Directory within which the `package.json` file was found
1414
*/
1515
directory: string
16+
17+
/**
18+
* A windows version of the directory
19+
*/
20+
windowsDirectory: string
21+
1622
/**
1723
* Full scoped package name
1824
*/

.github/actions/src/init/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ runs:
3434
run: corepack enable
3535
shell: bash
3636

37-
- name: Do Windows Things (Powershell)
37+
- name: Enable Corepack (Powershell)
3838
if: ${{ inputs.shell == 'pwsh' }}
3939
run: |
4040
npm uninstall -g yarn
4141
corepack enable
42-
shell: ${{ inputs.shell }}
42+
shell: pwsh
4343

4444
- name: Use Node.js 💻
4545
uses: actions/setup-node@v4

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ${{ matrix.os }}
6464
defaults:
6565
run:
66-
working-directory: ${{ matrix.lib.directory }}
66+
working-directory: ${{ matrix.os == 'windows-latest' && matrix.lib.windowsDirectory || matrix.lib.directory }}
6767
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
6868

6969
name: ${{ matrix.lib.name }} library (${{ matrix.os }})

0 commit comments

Comments
 (0)