Skip to content
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

fix(amplify-frontend-ios): encapsulate path option values with quotes #12596

Merged

Conversation

josefaidt
Copy link
Contributor

@josefaidt josefaidt commented May 6, 2023

Description of changes

adds quotes to --path option values to prevent breaking when absolute path to amplify project contains spaces

Issue #, if available

fixes #12593

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@josefaidt josefaidt requested a review from a team as a code owner May 6, 2023 00:04
@josefaidt josefaidt changed the title fix(amplify-frontend-ios): pass paths to command options as strings fix(amplify-frontend-ios): encapsulate path option values with quotes May 6, 2023
Copy link
Contributor

@aws-eddy aws-eddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Amplifiyer
Copy link
Contributor

can we add unit tests to validate the pre & post behavior

@josefaidt
Copy link
Contributor Author

Hey @Amplifiyer what do you mean by pre and post behavior?

@jhockett jhockett merged commit 43f73ab into aws-amplify:dev Aug 1, 2023
@MorFix
Copy link

MorFix commented Aug 10, 2023

@josefaidt Is there a chance that this broke code generation for iOS?

Our team now getting this after amplify pull (after models are already generated):

Updating Xcode project:
🚫 folderNotFound: Amplify project not found at "/Users/<USER>/GitHub/<PROJECT>".
-- Recovery suggestion: Run `amplify init` to initialize an Amplify project.
🛑 Command failed with exit code 1: /Users/<USER>/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-config --path="/Users/<USER>/GitHub/<PROJECT>"

Reverting this commit either by a local amplify-dev or by downgrading to 12.2.3 solves this.
I don't mind contributing a fix to this (I guess it's in amplify-xcode) and tests if I can have the amplify-xcode source :)

@ykethan ykethan mentioned this pull request Aug 11, 2023
2 tasks
jhockett added a commit that referenced this pull request Aug 11, 2023
jhockett added a commit to jhockett/amplify-cli that referenced this pull request Aug 11, 2023
jhockett added a commit that referenced this pull request Aug 11, 2023
sobolk pushed a commit that referenced this pull request Aug 14, 2023
* Revert "fix(amplify-frontend-ios): pass paths to command options as strings (#12596)" (#13106)

This reverts commit 43f73ab.

* chore(release): Publish latest [ci skip]

 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]

---------

Co-authored-by: aws-amplify-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected argument *folder directory* when amplify pull is called in CLI
6 participants