-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdk init app: space causes failure #18803
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
package/tools
Related to AWS CDK Tools or CLI
Comments
scottiemc7
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 2, 2022
rix0rrr
added
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
and removed
p2
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 8, 2022
bhargav50
added a commit
to bhargav50/aws-cdk
that referenced
this issue
Feb 12, 2022
When dotnet command is invoked, if arguments are given with spaces unescaped, it interprets that as the start of second command. In this case, when csharp project is initialized, `dotnet sln` command is invoked with slnPath and fsprojPath. Spaces in `slnPath` and `fsprojPath` should be escaped before providing them as argument to dotnet command Fixes aws#18803 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of t he Apache-2.0 license*
Thank you @bhargav50 for getting a fix created. I have also ran into this and just removed the spaces from my explorer as a quick fix for the time being. |
mergify bot
pushed a commit
that referenced
this issue
Jul 8, 2022
A v1 app or library cannot be created from the v2 cli. This cleans up the v1 init template code. This is stupidly long because of the amount of files deleted and moved so here's a rundown of the changes: - v1 templates deleted (github is showing some of these as renamed because they were duplicates of the v2 files that did get moved) - v2 templates removed from `v2` folder and moved directly under `init-templates` - hook files imports updated (another place where it shows the change to v1 instead of v2 because the contents were the same) for templates and sample apps - `init.ts`: updated file paths to flattened directory - `init.test.ts`: - updated tests to only run for v2 templates - added test for `fsharp` since it was missing - updated .NET tests to look in the contents of the `.sln` file for the project information. I noticed that this test sometimes still passed when the `init` actually failed. Note: This is the first of two PRs to fix the bug for creating .NET projects with spaces in the file path (issue #18803). This PR was done separately so the bug fix didn't get lost in the 300 file changes due to the cleanup. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TheRealAmazonKendra
added a commit
that referenced
this issue
Jul 8, 2022
…space When running or with a space in the path to the project, init will fail. This fix adds in handling for spaces and other special characters in the filepath for both windows systems and posix systems. Tests have been added for posix and manual testing was performed on a windows machine. Closes issue #18803.
daschaa
pushed a commit
to daschaa/aws-cdk
that referenced
this issue
Jul 9, 2022
A v1 app or library cannot be created from the v2 cli. This cleans up the v1 init template code. This is stupidly long because of the amount of files deleted and moved so here's a rundown of the changes: - v1 templates deleted (github is showing some of these as renamed because they were duplicates of the v2 files that did get moved) - v2 templates removed from `v2` folder and moved directly under `init-templates` - hook files imports updated (another place where it shows the change to v1 instead of v2 because the contents were the same) for templates and sample apps - `init.ts`: updated file paths to flattened directory - `init.test.ts`: - updated tests to only run for v2 templates - added test for `fsharp` since it was missing - updated .NET tests to look in the contents of the `.sln` file for the project information. I noticed that this test sometimes still passed when the `init` actually failed. Note: This is the first of two PRs to fix the bug for creating .NET projects with spaces in the file path (issue aws#18803). This PR was done separately so the bug fix didn't get lost in the 300 file changes due to the cleanup. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TheRealAmazonKendra
added a commit
that referenced
this issue
Jul 22, 2022
…space When running or with a space in the path to the project, init will fail. This fix adds in handling for spaces and other special characters in the filepath for both windows systems and posix systems. Tests have been added for posix and manual testing was performed on a windows machine. Closes issue #18803.
TheRealAmazonKendra
added a commit
that referenced
this issue
Sep 3, 2022
…space When running or with a space in the path to the project, init will fail. This fix adds in handling for spaces and other special characters in the filepath for both windows systems and posix systems. Tests have been added for posix and manual testing was performed on a windows machine. Closes issue #18803.
mergify bot
pushed a commit
that referenced
this issue
Sep 9, 2022
…ins space (#21049) When running `cdk init --language=csharp` or `cdk init --language=fsharp` with one or more spaces in the path to the project, `init` will fail. This fix adds in handling for spaces and other special characters in the file path for both windows systems and posix systems. This PR moves the temporary hook directory to the same directory as the source directory so that it can use the local `os.ts` file and other dependencies. `ShellOptions` was also removed because it wasn't used. Tests have been added for posix and manual testing was performed on a windows machine. Closes issue #18803. ---- ### All Submissions: *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Kruspe
pushed a commit
to DavidSchwarz2/aws-cdk
that referenced
this issue
Sep 13, 2022
…ins space (aws#21049) When running `cdk init --language=csharp` or `cdk init --language=fsharp` with one or more spaces in the path to the project, `init` will fail. This fix adds in handling for spaces and other special characters in the file path for both windows systems and posix systems. This PR moves the temporary hook directory to the same directory as the source directory so that it can use the local `os.ts` file and other dependencies. `ShellOptions` was also removed because it wasn't used. Tests have been added for posix and manual testing was performed on a windows machine. Closes issue aws#18803. ---- ### All Submissions: *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
vinayak-kukreja
assigned vinayak-kukreja and unassigned vinayak-kukreja and TheRealAmazonKendra
Apr 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
package/tools
Related to AWS CDK Tools or CLI
What is the problem?
When running the
cdk init app --language csharp
command from a directory that has a space in its path, I get the following error:~\Documents\My Projects\CdkTesting> cdk init app --language csharp
Reproduction Steps
Run 'cdk init app --language csharp' from a directory with a space in the path
What did you expect to happen?
A project to be created
What actually happened?
Loud noises and explosions
CDK CLI Version
2.10.0 (build e5b301f)
Framework Version
No response
Node.js Version
v12.22.7
OS
Windows
Language
.NET
Language Version
C#
Other information
Moving to a directory without a space in the path solved the issue.
The text was updated successfully, but these errors were encountered: