Skip to content
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

[TINKERPOP-2489] Server doesn't start if folder has spaces #3020

Open
wants to merge 1 commit into
base: 3.7-dev
Choose a base branch
from

Conversation

flora-jin
Copy link
Contributor

TINKERPOP: https://issues.apache.org/jira/browse/TINKERPOP-2489

Bug: If working directory contained spaces running gremlin-server.sh resulted in file not found exception

Fix: added quotations to appropriate areas and fixed code that replaced spaces with colons to not change any spaces directory names.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.36%. Comparing base (9b46b67) to head (d923edb).
Report is 307 commits behind head on 3.7-dev.

Additional details and impacted files
@@              Coverage Diff              @@
##             3.7-dev    #3020      +/-   ##
=============================================
+ Coverage      76.14%   76.36%   +0.22%     
- Complexity     13152    13236      +84     
=============================================
  Files           1084     1061      -23     
  Lines          65160    61579    -3581     
  Branches        7285     7342      +57     
=============================================
- Hits           49616    47026    -2590     
+ Misses         12839    12033     -806     
+ Partials        2705     2520     -185     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -166,7 +166,7 @@ start() {
exit 1
fi

$JAVA -Dlogback.configurationFile=$LOGBACK_CONF $JAVA_OPTIONS -cp $CLASSPATH $GREMLIN_SERVER_CMD "$GREMLIN_YAML" >> "$LOG_FILE" 2>&1 &
$JAVA -Dlogback.configurationFile="$LOGBACK_CONF" $JAVA_OPTIONS -cp "$CLASSPATH" "$GREMLIN_SERVER_CMD" "$GREMLIN_YAML" >> "$LOG_FILE" 2>&1 &
Copy link
Contributor

Choose a reason for hiding this comment

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

Should JAVA_OPTIONS also be quoted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JAVA_OPTIONS being quoted threw an exception regarding memory.

@andreachild
Copy link
Contributor

VOTE +1

@@ -96,7 +96,7 @@ fi

# Build Java CLASSPATH
CP="$GREMLIN_HOME/conf/"
CP="$CP":$( echo $GREMLIN_HOME/lib/*.jar . | sed 's/ /:/g')
CP="$CP":$( find "$GREMLIN_HOME/lib" -name "*.jar" -print | tr '\n' ':' )
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a slight difference in the output of these 2 commands.

echo $GREMLIN_HOME/lib/*.jar . | sed 's/ /:/g' produces something like this:
path_to_x.jar:path_to_y.jar:path_to_z.jar:.

whereas find "$GREMLIN_HOME/lib" -name "*.jar" -print | tr '\n' ':' produces something like this:
path_to_x.jar:path_to_y.jar:path_to_z.jar:

The new classpath is missing the current directory (.).

Also just a small nit, the new classpath is ending with a trailing :, I don't think this causes any issues but it is a bit atypical.

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.

4 participants