Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore project flag behavior #465

Merged
merged 3 commits into from
Jan 4, 2024
Merged

Conversation

sourishkrout
Copy link
Member

@sourishkrout sourishkrout commented Jan 4, 2024

Empty project flag actually means default to cwd but with find repo upwards whereas non-empty project flag pins the specified dir (without applying find repo upwards).

PS: This matches the behavior of the pre-project-svc implementation.

@sourishkrout sourishkrout force-pushed the restore-project-flag-behavior branch from 062f255 to 24de324 Compare January 4, 2024 17:28
@@ -58,7 +58,7 @@ func listCmd() *cobra.Command {
block := task.CodeBlock
lines := block.Lines()
relPath, err := filepath.Rel(getCwd(), task.DocumentPath)
if err != nil || !isTerminal(io.Out.Fd()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adambabik removing the tty check for consistency. as mentioned, we'll get an absolute path here when the repo’s worktree is assigned from searching upward for .git. in all other cases the path is relative. i thought about fixing it upstream but it seemed ugly having to reconstruct the fs struct with a relative as opposed to an absolute path.

Copy link

sonarqubecloud bot commented Jan 4, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@sourishkrout sourishkrout merged commit b2ec634 into main Jan 4, 2024
@sourishkrout sourishkrout deleted the restore-project-flag-behavior branch January 4, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants