Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion server/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,9 @@ fn check_file(
let real = util::file_path(&uri).unwrap_or_else(|| path.to_path_buf());
let project = Project::memoized(projects, &real, Some(view_roots));
let mut checked = Checked::new(OK);
checked.unlocked_app = project.rails_root_without_lockfile(&real).map(|app| {
// Spelled as given, made absolute: a path back from the file URI may be written differently on Windows.
let typed = std::path::absolute(path).unwrap_or_else(|_| real.clone());
checked.unlocked_app = project.rails_root_without_lockfile(&typed).map(|app| {
let shown = shown_path(&app, output.cwd);
let shown = if shown.as_os_str().is_empty() { Path::new(".") } else { shown };
(app.clone(), shown.to_path_buf())
Expand Down
1 change: 1 addition & 0 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ try {
assert.ok(
lockNotes[0].includes(root) &&
/Rails\/\*, Stimulus\/\* and Turbo\/\*/.test(lockNotes[0]),
`the note names ${root}\n${r.stderr}`,
);
r = run(["check", "app/views/users/index.html.slim"], undefined, root);
assert.match(
Expand Down
Loading