                 print("generated:", outpath.prettyPath)
                 
             case .dumpPackage:
-                let root = opts.outputPath ?? opts.path.root
+                let root = opts.inputPath ?? opts.path.root
                 let manifest = try parseManifest(path: root, baseURL: root)
                 let package = manifest.package
                 let json = try jsonString(package: package)

private class PackageToolOptions: Options {
    var initMode: InitMode = InitMode.library
    var showDepsMode: ShowDependenciesMode = ShowDependenciesMode.text
    var outputPath: String? = nil
    var verbosity: Int = 0
    var colorMode: ColorWrap.Mode = .Auto

private enum PackageToolFlag: Argument {
    case initMode(String)
    case showDepsMode(String)
    case inputPath(String)
    case outputPath(String)
    case chdir(String)
    case colorMode(ColorWrap.Mode)
