         try tempFolder.delete()
 
         print("Executing `swift build` & `swift test --parallel`")
-        try shellOut(to: "cd \(projectName) && swift build && swift test --parallel")
+        try shellOut(to: "swift build && swift test --parallel", at: folder.path)
 
         print("Generating xcodeproj...")
-        try shellOut(to: "cd \(projectName) && swift package generate-xcodeproj")
+        try shellOut(to: "swift package generate-xcodeproj", at: folder.path)
     }
 
     // MARK: Private method

        print("        └── {PROJECT_NAME}Tests.swift")
        print("--------------")
        print("Based on https://www.swiftbysundell.com/posts/building-a-command-line-tool-using-the-swift-package-manager")
    }

    private func replaceAllFilesOfContentInFolder(oldName: String, newName: String, at folderPath: String) throws {

    }

    public func run() throws {
        guard arguments.count > 1 else {
            printDescription()
            return
        }

        let projectName = arguments[1]
        var folder = try FileSystem().createFolder(at: projectName)

        var expectingPath = false
        for argument in arguments[2..<arguments.count] {
            if expectingPath {
                try folder.delete()
                /// Use a given path for creating Package.
                folder = try Folder(path: argument).createSubfolder(named: projectName)
            }

            switch argument {
                case "--path":
                    expectingPath = true
                default:
                    expectingPath = false
                    continue
            }
        }

        print("Executing `swift package init --type executable`...")
        try shellOut(to: "swift package init --type executable", at: folder.path)

