diff --git a/cli/lib/twenty/cli/command/disconnect.rb b/cli/lib/twenty/cli/command/disconnect.rb index 1cdbb49..fe4ab13 100644 --- a/cli/lib/twenty/cli/command/disconnect.rb +++ b/cli/lib/twenty/cli/command/disconnect.rb @@ -16,7 +16,7 @@ class Twenty::Command::Disconnect < Twenty::Command private def run_command(options) - path = File.reapath(options.path ? options.path : Dir.getwd) + path = File.realpath(options.path ? options.path : Dir.getwd) Twenty::Project .where(path:) .first! diff --git a/server/lib/twenty/server/model/project.rb b/server/lib/twenty/server/model/project.rb index 27bdeb5..f05cc85 100644 --- a/server/lib/twenty/server/model/project.rb +++ b/server/lib/twenty/server/model/project.rb @@ -13,7 +13,7 @@ class Twenty::Project < Sequel::Model def validate super errors.add(:path, "does not exist on disk") if !path_exist? - errors.add(:path, "is not absolute") if !File.absolute_path?(path) + errors.add(:path, "is not absolute") if !File.absolute_path?(self[:path]) end ##