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

'docpad run' asks me which program I want to open the file 'docpad.js' with #561

Closed
craigagnew opened this issue Jul 24, 2013 · 10 comments
Closed

Comments

@craigagnew
Copy link

@craigagnew craigagnew commented Jul 24, 2013

Hi guys,

In response to the following tweet...

https://twitter.com/DocPad/status/360032863309135876

My experience went something like this:

  1. I went through the installation steps on the docpad website, including installing Git, Node.js and Growl (plus extension for notifications).
  2. I fired up command prompt and done a 'mkdir [foldername]'
  3. Under my newly created folder I ran 'docpad run', which prompted me to choose a template - I was expecting this as I wanted to have a look at some of the examples.
  4. After the files were checked out from the repository I tried hitting localhost:9778, which came back 404.
  5. I thought another 'docpad run' was in order then, so executed that and Windows prompted me to select a program to open the 'docpad.js' file that exists in the directory of my website (shown below).
  6. If I select a program, or if I click cancel, nothing (docpad related) happens and I either get a new line in the command prompt or an 'Access denied' if I cancelled.

I'm running Windows 7 64-bit.

Thanks,
Craig

image

@balupton
Copy link
Member

@balupton balupton commented Jul 24, 2013

Hrmm, can you add me on skype (username balupton) and grab teamviewer and I'll remote in and debug.

@balupton
Copy link
Member

@balupton balupton commented Jul 24, 2013

Which skeleton did you clone out? Does it work with another skeleton?

@craigagnew
Copy link
Author

@craigagnew craigagnew commented Jul 24, 2013

Seems to be with any template that has docpad.js in the root directory. I used the bervy site template.

@craigagnew
Copy link
Author

@craigagnew craigagnew commented Jul 24, 2013

Ok, after more digging it seems it's an issue when running commands inside a directory with a file of the same name:

http://stackoverflow.com/questions/10933111/gruntjs-grunt-cmd-opens-visual-studio

Running 'docpad.cmd run' gets around the issue.

@craigagnew craigagnew closed this Jul 24, 2013
@amb26
Copy link

@amb26 amb26 commented May 1, 2016

This resolution is no good since it prevents me from writing cross-platform scripts invoking "docpad". I can't insert "docpad.cmd", e.g. into an npm script definition

@balupton
Copy link
Member

@balupton balupton commented May 1, 2016

@amb26 nothing we can do though, as this is just windows being lame.

Perhaps https://github.com/dthree/cash or https://blog.docker.com/2016/03/docker-for-mac-windows-beta/ will help

@pflannery
Copy link
Contributor

@pflannery pflannery commented May 1, 2016

@amb26

You could rename docpad.js config file to something else and then run

docpad run -c myconfig.js

or

You can use a docpad.coffee formatted file instead

or

use powershell or bash as they dont have this problem.

@amb26
Copy link

@amb26 amb26 commented May 2, 2016

@pflannery - Thanks for the productive suggestion. Option 1 worked fine. I didn't find docs on docpad's CLI options, I would have expected them together with the rest of the CLI docs at http://docpad.org/docs/cli/ ?

@balupton
Copy link
Member

@balupton balupton commented May 2, 2016

docpad --help should be comprehensive, added to cli docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants