Skip to content

Commit 51c729e

Browse files
authored
refactor(angular, react, vue): add missing test app msg (#28951)
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The packages, Angular, React, and Vue, will accept any `app_dir` parameter when passing it to the build script. This can lead to a user to entering a directory that doesn't exist within `test/apps`. If this happens, then the build folder will include an incomplete test app. For example: 1. `./build ng13` 2. This creates a `build/ng13` folder, but the folder only contains the contents from the `base` folder. This causes it to be incomplete. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Provides a message that the provided app directory doesn't exist. - Does not create the incomplete app when an invalid app directory is given. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 4. Update the BREAKING.md file with the breaking change. 5. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> N/A
1 parent 7f3273f commit 51c729e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

packages/angular/test/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ FULL_BASE_DIR="${BASE_DIR}/."
2222
# The full path to the built application.
2323
BUILD_APP_DIR="${BUILD_DIR}/${APP_DIR}/"
2424

25+
# Make sure the full app directory exists.
26+
if [ ! -d $FULL_APP_DIR ]; then
27+
echo "Could not find test app: ${FULL_APP_DIR}"
28+
exit 1
29+
fi
30+
2531
# Make the build directory if it does not already exist.
2632
mkdir -p $BUILD_DIR
2733

packages/react/test/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ FULL_BASE_DIR="${BASE_DIR}/."
2222
# The full path to the built application.
2323
BUILD_APP_DIR="${BUILD_DIR}/${APP_DIR}/"
2424

25+
# Make sure the full app directory exists.
26+
if [ ! -d $FULL_APP_DIR ]; then
27+
echo "Could not find test app: ${FULL_APP_DIR}"
28+
exit 1
29+
fi
30+
2531
# Make the build directory if it does not already exist.
2632
mkdir -p $BUILD_DIR
2733

packages/vue/test/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ FULL_BASE_DIR="${BASE_DIR}/."
2222
# The full path to the built application.
2323
BUILD_APP_DIR="${BUILD_DIR}/${APP_DIR}/"
2424

25+
# Make sure the full app directory exists.
26+
if [ ! -d $FULL_APP_DIR ]; then
27+
echo "Could not find test app: ${FULL_APP_DIR}"
28+
exit 1
29+
fi
30+
2531
# Make the build directory if it does not already exist.
2632
mkdir -p $BUILD_DIR
2733

0 commit comments

Comments
 (0)