-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: running commands with spaces on windows (#715)
Closes #692
- Loading branch information
1 parent
9822755
commit 44e3956
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { existsSync } from 'node:fs'; | ||
|
||
import { useTempPath } from '../../__setup__/hooks/useTempPath.js'; | ||
|
||
const actName = 'create-my-spaced-actor'; | ||
const { beforeAllCalls, afterAllCalls, joinPath } = useTempPath('spaced actor', { | ||
create: true, | ||
remove: true, | ||
cwd: true, | ||
cwdParent: false, | ||
}); | ||
|
||
const { CreateCommand } = await import('../../../src/commands/create.js'); | ||
|
||
describe.runIf(process.env.FORCE_WINDOWS_TESTS || process.platform === 'win32')('apify create on windows', () => { | ||
beforeEach(async () => { | ||
await beforeAllCalls(); | ||
}); | ||
|
||
afterEach(async () => { | ||
await afterAllCalls(); | ||
}); | ||
|
||
it('works for creating an actor when the folder path contains spaces', async () => { | ||
const ACT_TEMPLATE = 'python-playwright'; | ||
await CreateCommand.run([actName, '--template', ACT_TEMPLATE], import.meta.url); | ||
|
||
// check files structure | ||
expect(existsSync(joinPath(actName))).toBeTruthy(); | ||
}); | ||
}); |