-
Notifications
You must be signed in to change notification settings - Fork 119
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
Discard the local login server on non-desktop environment #1502
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,11 @@ func NewOsOpener(logger *logrus.Logger) *OsOpener { | |
logger: logger, | ||
} | ||
} | ||
|
||
// OpenerFunc is a func adapter for the Opener interface. | ||
type OpenerFunc func(string) error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is used only in test https://github.com/dcos/dcos-cli/pull/1502/files#diff-48a7e37bb2ef223e6225547541997ea1R58 so it can be placed in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though it is only used in a test right now, it is meant to be exposed to other projects using this package (to provide a custom open mechanism, or for their own tests). |
||
|
||
// Open invokes the OpenerFunc. | ||
func (f OpenerFunc) Open(resource string) error { | ||
return f(resource) | ||
} |
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.
Previously we returned at this point. Why this change?
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 lets use fallback to reading from stdin in that case.