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

--input=SingleFile.njk --output=. processes nothing #186

Closed
zachleat opened this issue Jul 31, 2018 · 7 comments
Closed

--input=SingleFile.njk --output=. processes nothing #186

zachleat opened this issue Jul 31, 2018 · 7 comments
Labels

Comments

@zachleat
Copy link
Member

zachleat commented Jul 31, 2018

image

As you can see in the screenshot, !./** takes precedence over ./filename.njk

@zachleat zachleat added the bug label Jul 31, 2018
@zachleat zachleat added low-priority Issues that are low-priority and will be closed—to be reopened if priorities change/backlog shrinks and removed low-priority Issues that are low-priority and will be closed—to be reopened if priorities change/backlog shrinks labels Aug 23, 2018
@rendall
Copy link

rendall commented Oct 16, 2018

Perhaps --output=. always triggers this bug.

This bug is also triggered in the case where the input directory is a subdirectory of the output directory. e.g. eleventy --input=src --output=. (and no combination of directory path seems to work around it:
--output=src/.., etc)

cd src and then eleventy --input=. --output=../ is a workaround.

(for version 0.5.4)

@rendall
Copy link

rendall commented Oct 16, 2018

This configuration in .eleventy.js will result in the output directory path ./false:

dir: {
  input: "src",
  output: ""
 }

I'm mentioning it here because I suspect it's related, because this configuration

dir: {
  input: "src",
  output: "."
 }

results in no files processed.

@rendall
Copy link

rendall commented Oct 16, 2018

Perhaps related to #232

dir: {
  input: "src",
  output: "/"
 }

results in the output directory being the root directory! That's unexpected.

@kleinfreund
Copy link
Contributor

I expect the output directory configured with output: "/" to be the root directory. Same applies for input: "/".

That said, I believe Eleventy shouldn’t allow neither the input nor the output directory to be outside of the project directory.

@zachleat
Copy link
Member Author

zachleat commented Jan 9, 2019

@kleinfreund hmm good point that does seem potentially dangerous.

@kleinfreund
Copy link
Contributor

I don’t think this is an issue. The input file location should rule out the output directory to be the same because people will eventually end up overwriting their own files. In general, the output directory should never be the Eleventy project directory.

@zachleat
Copy link
Member Author

Fixed with #1129 but tests just added in 8c3377c

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

No branches or pull requests

3 participants