-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
@nathanpotter Cold you please review this? |
@coadler is this ready for review? I thought we were waiting for the other half to be implemented or we had decided not to do it a while ago, I can't remember |
I made a comment on the original issue to figure out how we want to handle some default behavior which I felt needed to be answered before we tackle the other part. It unfortunately didn't get any comments :D. This should be good though |
globalflags.go
Outdated
return r | ||
} | ||
|
||
// pathIsRunnable returns the container name if the given path exists and is | ||
// in the projects directory, else an empty string An error is returned if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// in the projects directory, else an empty string An error is returned if | |
// in the projects directory. Otherwise an empty string and an error is returned if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible for an empty string and a nil error to be returned if the path doesn't exist inside of the projects directory. The error is only if the specified directory exists and is outside of the projects directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I misunderstood, imo the error is more of a separate thought
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that sounds good, then I guess just a .
is needed after else an empty string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh oops
@@ -16,6 +16,7 @@ import ( | |||
|
|||
type repo struct { | |||
*url.URL | |||
subdir string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to open code-server to the subdirectory, are we planning to handle that in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah see #72 (comment). Right now it just always defaults to the base directory of the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just needs the updated comment and rebase
This is one half of #72
Allows users to specify a location on disk when running a sail repo.
It will error if you specify a folder outside of the project directory
Note: currently specifying a subdirectory of a project will default to opening the base directory of the project.