{"record":{"id":"8ad92a056a456b67","repo":"jordansissel/fpm","slug":"cannot-chdir-to-chdir-does-it-exist","errorCode":null,"errorMessage":"Cannot chdir to '#{chdir}'. Does it exist?","messagePattern":"Cannot chdir to '#(.+?)'\\. Does it exist\\?","errorType":"exception","errorClass":"FPM::InvalidPackageConfiguration","httpStatus":null,"severity":"error","filePath":"lib/fpm/package/dir.rb","lineNumber":78,"sourceCode":"\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\n\n  # Output this package to the given directory.\n  def output(output_path)\n    output_check(output_path)\n","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/jordansissel/fpm/blob/b6d77ba72a560b687723376a0e5115c3a92634ad/lib/fpm/package/dir.rb#L60-L96","documentation":"Error \"Cannot chdir to '#{chdir}'. Does it exist?\" thrown in jordansissel/fpm.","triggerScenarios":"Thrown at lib/fpm/package/dir.rb:78 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"}