Skip to content

Commit 7274239

Browse files
committed
Create Intermediate Variables
1 parent 83b3c0b commit 7274239

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

cppython/plugins/vcpkg/plugin.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,14 @@ def install(self) -> None:
198198
file.write(serialized)
199199

200200
executable = self.core_data.cppython_data.install_path / 'vcpkg'
201+
install_directory = self.data.install_directory
202+
build_path = self.core_data.cppython_data.build_path
203+
201204
logger = getLogger('cppython.vcpkg')
202205
try:
203206
subprocess.run(
204-
[str(executable), 'install', f'--x-install-root={self.data.install_directory}'],
205-
cwd=self.core_data.cppython_data.build_path,
207+
[str(executable), 'install', f'--x-install-root={str(install_directory)}'],
208+
cwd=str(build_path),
206209
check=True,
207210
capture_output=True,
208211
)
@@ -222,11 +225,14 @@ def update(self) -> None:
222225
file.write(serialized)
223226

224227
executable = self.core_data.cppython_data.install_path / 'vcpkg'
228+
install_directory = self.data.install_directory
229+
build_path = self.core_data.cppython_data.build_path
230+
225231
logger = getLogger('cppython.vcpkg')
226232
try:
227233
subprocess.run(
228-
[str(executable), 'install', f'--x-install-root={self.data.install_directory}'],
229-
cwd=self.core_data.cppython_data.build_path,
234+
[str(executable), 'install', f'--x-install-root={str(install_directory)}'],
235+
cwd=str(build_path),
230236
check=True,
231237
capture_output=True,
232238
)

0 commit comments

Comments
 (0)