Skip to content

Add Windows support #84

Description

@kbens

psa-cli is currently Linux-only. PeopleSoft runs on Windows too — supporting Windows opens psa-cli to Windows-based PeopleSoft administrators.

Current Linux assumptions

  • pyproject.toml classifier: Operating System :: POSIX :: Linux
  • README + docs claim Linux-only
  • CI matrix runs only on ubuntu-latest

Known sticking points

Area Linux Windows Notes
Privilege escalation sudo runas / UAC SudoFileOps would need a Windows backend
File permissions chmod/chown NTFS ACLs Different model entirely
Process invocation psadmin shell psadmin.cmd / tmadmin.exe Path + extension differences
Default paths /u01/app/... C:\\PS_*\\... Need OS-aware defaults
DPK install DPK for Linux DPK for Windows (different layout) Each command needs OS branching
Terminal / ANSI Native Windows Terminal OK, cmd.exe limited Rich handles most of this automatically
Subprocess invocation Forward slashes, sh-style quoting Backslashes, cmd-style quoting subprocess_runner likely needs review

Suggested approach

  1. Scope first — survey every subprocess.run, hard-coded /, os.geteuid, sudo, psadmin shell-out, and the prereq-check shell scripts. Identify the actual surface area.
  2. Abstract OS-specific behavior behind a small platform layer (e.g. psa.core.platform.escalate(), psa.core.platform.psadmin_cmd()) instead of inlining os.name checks everywhere.
  3. Add Windows to the CI matrix (windows-latest). This will quickly surface anything broken.
  4. Test against a real Windows PeopleSoft environment for the DPK and domain commands — unit tests won't catch shell-out integration issues.
  5. Update README + docs + pyproject classifiers once parity is real.

References

  • PeopleSoft DPK for Windows: deployment differs significantly from Linux DPK
  • Python pathlib.Path and shutil already handle most cross-platform path work — leverage them

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions