Skip to content

Auto create .aws folder if needed - #7

Open
sweep-ai-deprecated[bot] wants to merge 5 commits into
masterfrom
sweep/create-aws-folder
Open

Auto create .aws folder if needed#7
sweep-ai-deprecated[bot] wants to merge 5 commits into
masterfrom
sweep/create-aws-folder

Conversation

@sweep-ai-deprecated

Copy link
Copy Markdown
Contributor

Description:
This PR adds a check at the start of the index.ts file to see if the .aws folder exists. If it doesn't exist, the code will create the folder using the 'fs' module in Node.js.

Changes Made:

  • Added a check using 'fs.existsSync' to see if the .aws folder exists
  • If the folder doesn't exist, created it using 'fs.mkdirSync'

Testing:

  • Manually tested the code by running the application and verifying that the .aws folder is created if it doesn't exist.

Related Issue:
Link to Issue #1

Fixes #1.

To checkout this PR branch, run the following command in your terminal:

git checkout sweep/create-aws-folder

@sweep-ai-deprecated sweep-ai-deprecated Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice work on adding the condition to check and create the .aws directory if it doesn't exist. However, there's a small issue that needs to be addressed:

  • In index.ts, you have duplicate import statements on lines 15-16. You only need to import IPackageJson and join from path once. Please remove the duplicates.

Keep up the good work!

@jld-adriano

Copy link
Copy Markdown
Contributor

There's other places where .aws folder is needed. Can you make it a reusable function, and use it everywhere it's needed?

@jld-adriano

Copy link
Copy Markdown
Contributor

Don't do it at the beginning of the file, run it only when a command needs it. So should be inside whatever commands need it

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.

Sweep: Auto create .aws folder if needed

1 participant