Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add cwd to ops#271

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
demonolock wants to merge1 commit intomasterfromadd-cwd-to-ops
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionstestgres/operations/local_ops.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -101,6 +101,7 @@ def _run_command__nt(self, cmd, shell, input, stdin, stdout, stderr, get_process
process = subprocess.Popen(
cmd,
shell=shell,
cwd=self.cwd,
stdin=stdin or subprocess.PIPE if input is not None else None,
stdout=stdout,
stderr=stderr,
Expand DownExpand Up@@ -151,6 +152,7 @@ def _run_command__generic(self, cmd, shell, input, stdin, stdout, stderr, get_pr
process = subprocess.Popen(
cmd,
shell=shell,
cwd=self.cwd,
stdin=stdin or subprocess.PIPE if input is not None else None,
stdout=stdout or subprocess.PIPE,
stderr=stderr or subprocess.PIPE,
Expand Down
6 changes: 6 additions & 0 deletionstestgres/operations/os_ops.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
import getpass
import locale
import os


class ConnectionParams:
Expand All@@ -18,6 +19,7 @@ def get_default_encoding():

class OsOperations:
def __init__(self, username=None):
self.cwd = os.getcwd()
self.ssh_key = None
self.username = username or getpass.getuser()

Expand DownExpand Up@@ -133,3 +135,7 @@ def is_port_free(self, number: int):

def get_tempdir(self) -> str:
raise NotImplementedError()

def set_cwd(self, cwd):
if cwd:
self.cwd = cwd

[8]ページ先頭

©2009-2025 Movatter.jp