Skip to content

Glob function issue #46

Description

@Lancelotbronner

Context

I am using macOS High Sierra v10.13.3. Using with framework xcproj.

What

So there is this path to an xcodeproj (valid, I checked) and xcproj uses the glob function to find the project.pbxproj in it.
let pbxprojPaths = path.glob("*.pbxproj")

This only returns one path (good)
with the url being "/" (bad)

Activity

  1. kylef commented on Feb 18, 2018

    @kylef
    Owner

    Hi @Lancelotbronner, I've modified the tests in the project to perform a similar glob which appears to be working for me. Are you doing anything much different from the diff below?

    diff --git a/Tests/PathKitTests/XCTest.swift b/Tests/PathKitTests/XCTest.swift
    index 6d6fee2..5a33a1d 100644
    --- a/Tests/PathKitTests/XCTest.swift
    +++ b/Tests/PathKitTests/XCTest.swift
    @@ -1,7 +1,16 @@
     import XCTest
    +import PathKit
     
     class PathKitTests: XCTestCase {
       func testRunSpectre() {
         testPathKit()
       }
    +
    +  func testXcodeProj() {
    +    print("-----------------")
    +    let path = Path("/Users/kyle/Projects/kylef/palaver-ios/Palaver.xcodeproj")
    +    print(path)
    +    print(path.glob("*.pbxproj"))
    +    print("-----------------")
    +  }
     }
    -----------------
    /Users/kyle/Projects/kylef/palaver-ios/Palaver.xcodeproj
    [/Users/kyle/Projects/kylef/palaver-ios/Palaver.xcodeproj/project.pbxproj]
    -----------------
  2. kylef commented on Feb 18, 2018

    @kylef
    Owner

    Perhaps you could create a test case in PathKit which could show the broken behaviour? Although PathKit isn't doing much more than the system glob method that PathKit is using so it would be worth adding breakpoints to the glob method and see what is going on in your case.

  3. Lancelotbronner commented on Feb 19, 2018

    @Lancelotbronner
    Author
  4. Lancelotbronner commented on Feb 24, 2018

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions