- 
                Notifications
    
You must be signed in to change notification settings  - Fork 16
 
Add the ability to disable autostart #366
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
Conversation
cd2c457    to
    47c9805      
    Compare
  
    
          Qodana Community for JVM47 new problems were found 
 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either: 
 To get        - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.3.0
        with:
          upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com 
  | 
    
47c9805    to
    1550453      
    Compare
  
    On macOS this is checked by default for 2.5.0 and above.
1550453    to
    7c4fcaf      
    Compare
  
    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.
Some suggestions, but LGTM apart from that.
| fun configSsh(workspaceNames: List<String>, version: SemVer? = tryVersion()) { | ||
| writeSSHConfig(modifySSHConfig(readSSHConfig(), workspaceNames, version)) | 
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.
Suggestion: refactor to configSsh(options: configSSHOptions) where options consists of
  workspaceNames: List<String>
  disableAutostart: boolean
This allows you to then simplify the logic in line 235 to
if (opts.disable-autostart) "--disable-autostart" else null
and move the version checking logic outside of modifySSHConfig()
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 was thinking of something like this!  But then it felt weird because sometimes we would use the settings (for header command) and sometimes not (for disable autostart).  Maybe a supports or features object that has keys for what features are supported then I have settings.disableAutostart && supports.disableAutostart.
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.
Gotcha, that would definitely make things more confusing. Not a blocker for me in any case.
38816fb    to
    373329b      
    Compare
  
    373329b    to
    1dece08      
    Compare
  
    
On macOS this is checked by default for 2.5.0 and above.
Closes #365