Skip to content
Open
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
6 changes: 5 additions & 1 deletion dev/make-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ mkdir "$DISTDIR/conf"
cp "$SPARK_HOME"/conf/*.template "$DISTDIR/conf"
cp "$SPARK_HOME/README.md" "$DISTDIR"
cp -r "$SPARK_HOME/bin" "$DISTDIR"
cp -r "$SPARK_HOME/python" "$DISTDIR"
if command -v git && command -v cpio && git rev-parse --git-dir 2>/dev/null; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To keep the console clean, how about redirecting the stdout/stderr of command -v to /dev/null?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it follows the existing command -v pattern, e.g., in line 128 if [ $(command -v git) ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it. Let's fix all the occurrences of such pattern in the separate PR if we should do it.

git ls-files -z "$SPARK_HOME/python" | cpio -0pdm "$DISTDIR"
else
cp -r "$SPARK_HOME/python" "$DISTDIR"
fi

# Remove the python distribution from dist/ if we built it
if [ "$MAKE_PIP" == "true" ]; then
Expand Down