Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

"dancer -a" fails with usage message if path not writable (-w) #897

spazm opened this Issue Feb 17, 2013 · 1 comment


None yet
1 participant

spazm commented Feb 17, 2013

dancer -a does not provide useful diagnostic output if the selected path is not writable (fails the -w test). Currently only the pod2usage(-verbose =>1) message is shown with an exit code of 1.

pod2usage( -verbose => 1 ) unless -d $path && -w $path;

I'm developing inside a virtual machine managed by vagrant. The NFS mount from my host OS to virtual machine squashes usernames so any user on the VM can write to the partition. However, it doesn't look like you can write: -w fails and running ls shows a restrictive mask and a different user.

[vagrant@vm64] 1513% ls -ld .                                        :) ~/src/fun
drwxrwxr-x 4 503 users 136 2013-02-17 08:28 ./
[vagrant@vm64] 1514% id                                              :) ~/src/fun
uid=1000(vagrant) gid=1000(vagrant) groups=1000(vagrant),4(adm),20(dialout),24(cdrom),46(plugdev),109(lpadmin),110(sambashare),111(admin)

[vagrant@vm64] 1573% dancer -a foo                                   :) ~/src/fun
    dancer [options] -a <appname>

    -h, --help            : print what you are currently reading
    -a, --application     : the name of your application
    -p, --path            : the path where to create your application
                              (current directory if not specified)
    -x, --no-check        : don't check for the latest version of Dancer
                              (checking version implies internet connection)
    -v, --version         : print the version of dancer being used

[vagrant@vm64] 1574% mkdir foo                                     1 :( ~/src/fun
[vagrant@vm64] 1575%                                                 :) ~/src/fun

Ideally, I'd like to be able to run dancer -a in this situation. Or it'd be nice to get an error "I can't write to path:$path" or "path exists and is not a directory!" depending on if the -d or -w test failed.

@yanick yanick closed this in 05cbf8e Apr 3, 2013

spazm commented Apr 3, 2013

Thanks Yanick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment