@@ -147,9 +147,11 @@ def get_swiftpm_options(
147147 return args
148148
149149
150- def get_swiftpm_environment_variables ():
150+ def get_swiftpm_environment_variables (action : str ):
151151 env = dict (os .environ )
152152 env ["SWIFTCI_USE_LOCAL_DEPS" ] = "1"
153+ if action == "install" :
154+ env ["SOURCEKIT_LSP_CI_INSTALL" ] = "1"
153155 return env
154156
155157
@@ -194,7 +196,7 @@ def invoke_swiftpm(
194196
195197def build (args : argparse .Namespace ) -> None :
196198 print ("** Building swift-format **" )
197- env = get_swiftpm_environment_variables ()
199+ env = get_swiftpm_environment_variables (args . action )
198200 invoke_swiftpm (
199201 package_path = args .package_path ,
200202 swift_exec = args .swift_exec ,
@@ -212,7 +214,7 @@ def build(args: argparse.Namespace) -> None:
212214
213215def test (args : argparse .Namespace ) -> None :
214216 print ("** Testing swift-format **" )
215- env = get_swiftpm_environment_variables ()
217+ env = get_swiftpm_environment_variables (args . action )
216218 invoke_swiftpm (
217219 package_path = args .package_path ,
218220 swift_exec = args .swift_exec ,
@@ -233,7 +235,7 @@ def install(args: argparse.Namespace) -> None:
233235
234236 print ("** Installing swift-format **" )
235237
236- env = get_swiftpm_environment_variables ()
238+ env = get_swiftpm_environment_variables (args . action )
237239 swiftpm_args = get_swiftpm_options (
238240 swift_exec = args .swift_exec ,
239241 package_path = args .package_path ,
0 commit comments