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

Fails when a directory-name has an @ symbol #169

Closed
joelmukuthu opened this issue Dec 2, 2019 · 1 comment
Closed

Fails when a directory-name has an @ symbol #169

joelmukuthu opened this issue Dec 2, 2019 · 1 comment

Comments

@joelmukuthu
Copy link

Hi,

Locally, I've tried to mirror GitHub orgs so I've named my directories something like /home/foo/Projects/@unexpected/unexpected which is a local clone of this repo https://github.com/unexpectedjs/unexpected.

With that, this command:

hyperlink -ri --canonicalroot https://unexpected.js.org --skip content-type-mismatch --skip unexpected.js.org/unexpected- site-build/index.html | tap-spot

Fails with this error:

✖ FAIL load ../../%40unexpected/unexpected/site-build
  | operator: load
  | expected: 200 ../../%40unexpected/unexpected/site-build
  |   actual: ENOENT: no such file or directory, open '/home/foo/Projects/%40unexpected/unexpected/site-build/'
  |       at: site-build/assertions/any/to-be/index.html:7:36 <a href="/">...</a>
  
  257 tests
   15 skipped
  256 passed
    1 failed

But as you can see a bunch of other tests also pass. It works if I rename the directory to something without the @ symbol.

I'm running on an Ubuntu 18.04 machine with [email protected]. Let me know if I should provide more info.

Best,
Joel.

@Munter
Copy link
Owner

Munter commented May 3, 2020

I've tried to recreate this problem, but have been unable to.

@ in a path within the web root:

$ node lib/cli.js testdata/httpEscapedEntityInPath/index.html
Guessing --root from input files: file:///Users/pbm/git/hyperlink/testdata/httpEscapedEntityInPath/
TAP version 13
# Crawling internal assets
ok 1 load testdata/httpEscapedEntityInPath/index.html
ok 2 load testdata/httpEscapedEntityInPath/@namespace/index.html
# Crawling 0 outgoing urls
# Connecting to 0 hosts (checking <link rel="preconnect" href="...">
# Looking up 0 host names (checking <link rel="dns-prefetch" href="...">

1..2
# tests 2
# pass  2

# ok

@ in a parent path of the web root:

$ node lib/cli.js @annoying/index.html
Guessing --root from input files: file:///Users/pbm/git/hyperlink/@annoying/
TAP version 13
# Crawling internal assets
ok 1 load @annoying/index.html
ok 2 load @annoying/a.html
# Crawling 0 outgoing urls
# Connecting to 0 hosts (checking <link rel="preconnect" href="...">
# Looking up 0 host names (checking <link rel="dns-prefetch" href="...">

1..2
# tests 2
# pass  2

# ok

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

No branches or pull requests

2 participants