Skip to content

Run cds compile command without -o option #172

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/run-codeql-unit-tests-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
run: |
if ! command -v cds &> /dev/null
then
## Workaround for https://github.tools.sap/cap/issues/issues/17840
npm install -g @sap/[email protected]
fi

Expand All @@ -97,8 +98,8 @@ jobs:
echo "I am compiling $cds_file"
cds compile $cds_file \
-2 json \
-o "$cds_file.json" \
--locations
--locations \
> "$cds_file.json" 2> "$cds_file.err"
done
popd
done
Expand Down
2 changes: 1 addition & 1 deletion extractors/cds/tools/index-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo "Processing CDS files to JSON"
# the same name
while IFS= read -r cds_file; do
echo "Processing CDS file $cds_file to:"
if ! $cds_command compile "$cds_file" -2 json -o "$cds_file.json" --locations 2> "$cds_file.err"; then
if ! $cds_command compile "$cds_file" -2 json --locations > "$cds_file.json" 2> "$cds_file.err"; then
stderr_truncated=`grep "^\[ERROR\]" "$cds_file.err" | tail -n 4`
error_message=$'Could not compile the file '"$cds_file"$'.\nReported error(s):\n```\n'"$stderr_truncated"$'\n```'
echo "$error_message"
Expand Down
Loading