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

Websocket example start script crashes when volume name contains space #608

Closed
luisgerhorst opened this issue Oct 30, 2013 · 5 comments
Closed

Comments

@luisgerhorst
Copy link

I was trying to make the example for web sockets run on my Mac and the start script ./_rel/bin/websocket_example crashed because I have a space in my volume name.

$ ./_rel/bin/websocket_example console
egrep: /Volumes/Macintosh: Is a directory
egrep: SSD/Users/luis/Documents/erlang/cowboy/examples/websocket/_rel/releases/1/vm.args: No such file or directory

Replacing the space in Macintosh SSD by an underscore fixed the problem.

@tsloughter
Copy link

Could you post what these lines from your _rel/bin/websocket_example file?

# Use $CWD/vm.args if exists, otherwise releases/APP_VSN/vm.args, or else etc/vm.args
if [ -e \"$RELEASE_ROOT_DIR/vm.args\" ]; then
    VMARGS_PATH=$RELEASE_ROOT_DIR/vm.args
    USE_DIR=$RELEASE_ROOT_DIR
else
    USE_DIR=$REL_DIR
    if [ -e \"$REL_DIR/vm.args\" ]; then
        VMARGS_PATH=\"$REL_DIR/vm.args\"
    else
        VMARGS_PATH=\"$REL_DIR/vm.args\"
    fi
fi

I'm updating it to quote the first one as well, but your path should mean it goes into the else and is thus already quoted. But maybe you have an older version of relx.

@essen
Copy link
Member

essen commented Nov 2, 2013

relx is automatically downloaded by erlang.mk now.

@luisgerhorst
Copy link
Author

At me it looks like this. I'm not sure what version of relx I have.

# Use $CWD/vm.args if exists, otherwise releases/APP_VSN/vm.args, or else etc/vm.args
if [ -e "$RELEASE_ROOT_DIR/vm.args" ]; then
    VMARGS_PATH=$RELEASE_ROOT_DIR/vm.args
    USE_DIR=$RELEASE_ROOT_DIR
else
    USE_DIR=$REL_DIR
    if [ -e "$REL_DIR/vm.args" ]; then
        VMARGS_PATH="$REL_DIR/vm.args"
    else
        VMARGS_PATH="$REL_DIR/vm.args"
    fi
fi

@essen
Copy link
Member

essen commented Mar 28, 2014

Does it still happen with Cowboy master?

@essen
Copy link
Member

essen commented Apr 17, 2014

I will assume this is fixed as upstream reports it should work. If you can confirm though I'll be thankful. If it doesn't work please reopen the ticket. Thanks!

@essen essen closed this as completed Apr 17, 2014
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

No branches or pull requests

3 participants