Closed rosswaycaster closed 1 year ago
@timothymiller mentioned on Discord that there was a typo in the docs. It should be yarn create t4-app --supabase-auth
! I still think this PR could be useful for making the script more robust against missing files. Open to feedback!
Overview:
This pull request makes a modification to the file removal commands in the
apps/cli/bin/index.js
script to prevent errors when the files or directories do not exist.Details:
In the
setup
function inapps/cli/bin/index.js
, therm
command was updated to use the-f
(force) option. This change applies to the removal of.github/workflows/cli.yml
,.github/workflows/docs.yml
, and.github/workflows/vscode.yml
files. The-f
option will prevent therm
command from throwing an error if the file does not exist, allowing the script to continue its execution.Reason:
The original script used the
rm -rf
command for both file and directory removal. However, this can lead to errors when a file does not exist becauserm -rf
is primarily intended for directory operations.This pull request modifies the script to use
rm -f
for file removal andrm -rf
for directories. This ensures that the script runs smoothly even if certain files don't exist.This specific change addresses an issue encountered when creating a new T4 project with
yarn create t4-app --supabase
, improving the overall user experience by preventing unnecessary errors and interruptions.Test Plan:
To test the changes, follow these steps:
bin
directory with the commandcd apps/cli/bin
.yarn install
to install any necessary dependencies.node index.js --supabase
.