Skip to content

Rock supports Windows PowerShell, References #862#861

Open
yangzhao02 wants to merge 1 commit into
alibaba:masterfrom
yangzhao02:yangzhao_dev
Open

Rock supports Windows PowerShell, References #862#861
yangzhao02 wants to merge 1 commit into
alibaba:masterfrom
yangzhao02:yangzhao_dev

Conversation

@yangzhao02
Copy link
Copy Markdown
Contributor

  1. Add supports for Windows powershell
  2. Some Python packages that are not available on Windows have been bypassed.
  3. test results
    3.1 add a file on Windows using rock
curl -X POST http://localhost:8000/write_file -H 'Content-Type: application/json' -d '{"path":"C:\\Users\\User\\Desktop\\hello.txt","content":"Hello from Rocklet on Windows!"}'

then we can see hello.txt on windows.
image

…Python libraries that are unavailable on Windows.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 21, 2026

CLA assistant check
All committers have signed the CLA.

@yangzhao02 yangzhao02 changed the title Rock supports Windows PowerShell, Rock supports Windows PowerShell, References #862 Apr 21, 2026

IS_WINDOWS = sys.platform == "win32"

if not IS_WINDOWS:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

搞个抽象类出来吧。别用这种方式

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

不然后续别的平台没法扩展了

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

比如BaseRocklet,LinuxRocklet,WindowsRocklet这样

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

WindowsRocklet里,主要实现PowerShellSession相关逻辑,import自己的包。

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.

3 participants