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

shell_windows: Detect shell under ssh #4401

Merged
merged 1 commit into from
Oct 18, 2024
Merged

shell_windows: Detect shell under ssh #4401

merged 1 commit into from
Oct 18, 2024

Conversation

albfan
Copy link

@albfan albfan commented Oct 15, 2024

Fixes: Issue #3582

Solution/Idea

$env:SHELL not empty is not definitive to detect shell terminal

Proposed changes

Reuse our logic to detect powershell if current result is not definitive.

Testing

Use crc oc-env under ssh on windows

fixes #3582

Copy link

openshift-ci bot commented Oct 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cfergeau for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@albfan albfan force-pushed the detect-powershell branch 2 times, most recently from cddb4db to c332132 Compare October 16, 2024 09:10
pkg/os/shell/shell_windows.go Outdated Show resolved Hide resolved
pkg/os/shell/shell_windows.go Outdated Show resolved Hide resolved
@albfan albfan force-pushed the detect-powershell branch 2 times, most recently from 3ae3da0 to d2e3972 Compare October 17, 2024 14:03
@praveenkumar
Copy link
Member

Check praveenkumar@1efb9fa one I think it would be more clear and we don't have to pass the process pid to helper function.

@albfan
Copy link
Author

albfan commented Oct 18, 2024

Many thanks for review Praveen.

Just to avoid go into further check, I added a default result to identify non detected shell

@praveenkumar
Copy link
Member

Looks like CI is failing because of fmt error run make fmt .

Copy link

openshift-ci bot commented Oct 18, 2024

@albfan: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc 8c30366 link true /test integration-crc
ci/prow/e2e-crc 8c30366 link true /test e2e-crc

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@albfan
Copy link
Author

albfan commented Oct 18, 2024

@praveenkumar should be fixed now. I find with goimports but not sure where CI show that error

@praveenkumar praveenkumar merged commit f4ccc58 into main Oct 18, 2024
27 of 32 checks passed
@albfan albfan deleted the detect-powershell branch October 22, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Powershell core support on microshift preset start hints
3 participants