{"record":{"id":"8ce1b917557580fb","repo":"jordansissel/fpm","slug":"cannot-package-the-path-file-join-chdir-source","errorCode":null,"errorMessage":"Cannot package the path '#{File.join(chdir, source)}', does it exist?","messagePattern":"Cannot package the path '#(.+?)', does it exist\\?","errorType":"exception","errorClass":"FPM::InvalidPackageConfiguration","httpStatus":null,"severity":"error","filePath":"lib/fpm/package/dir.rb","lineNumber":73,"sourceCode":"        source = File.basename(origin)\n      end\n    else\n      source, destination = path, \"/\"\n    end\n\n    if attributes[:prefix]\n      destination = File.join(attributes[:prefix], destination)\n    end\n\n    destination = File.join(staging_path, destination)\n\n    logger[\"method\"] = \"input\"\n    begin\n      ::Dir.chdir(chdir) do\n        begin\n          clone(source, destination)\n        rescue Errno::ENOENT => e\n          raise FPM::InvalidPackageConfiguration,\n            \"Cannot package the path '#{File.join(chdir, source)}', does it exist?\"\n        end\n      end\n    rescue Errno::ENOENT => e\n      raise FPM::InvalidPackageConfiguration,\n        \"Cannot chdir to '#{chdir}'. Does it exist?\"\n    end\n\n    # Set some defaults. This is useful because other package types\n    # can include license data from themselves (rpms, gems, etc),\n    # but to make sure a simple dir -> rpm works without having\n    # to specify a license.\n    self.license ||= \"unknown\"\n    self.vendor ||= [ENV[\"USER\"], Socket.gethostname].join(\"@\")\n  ensure\n    # Clean up any logger context we added.\n    logger.remove(\"method\")\n  end # def input","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/jordansissel/fpm/blob/b6d77ba72a560b687723376a0e5115c3a92634ad/lib/fpm/package/dir.rb#L55-L91","documentation":"Error \"Cannot package the path '#{File.join(chdir, source)}', does it exist?\" thrown in jordansissel/fpm.","triggerScenarios":"Thrown at lib/fpm/package/dir.rb:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b6d77ba72a560b687723376a0e5115c3a92634ad","analyzedAt":"2026-08-21T16:39:02.570Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}