@@ -147,9 +147,11 @@ def get_swiftpm_options(
147
147
return args
148
148
149
149
150
- def get_swiftpm_environment_variables ():
150
+ def get_swiftpm_environment_variables (action : str ):
151
151
env = dict (os .environ )
152
152
env ["SWIFTCI_USE_LOCAL_DEPS" ] = "1"
153
+ if action == "install" :
154
+ env ["SOURCEKIT_LSP_CI_INSTALL" ] = "1"
153
155
return env
154
156
155
157
@@ -194,7 +196,7 @@ def invoke_swiftpm(
194
196
195
197
def build (args : argparse .Namespace ) -> None :
196
198
print ("** Building swift-format **" )
197
- env = get_swiftpm_environment_variables ()
199
+ env = get_swiftpm_environment_variables (args . action )
198
200
invoke_swiftpm (
199
201
package_path = args .package_path ,
200
202
swift_exec = args .swift_exec ,
@@ -212,7 +214,7 @@ def build(args: argparse.Namespace) -> None:
212
214
213
215
def test (args : argparse .Namespace ) -> None :
214
216
print ("** Testing swift-format **" )
215
- env = get_swiftpm_environment_variables ()
217
+ env = get_swiftpm_environment_variables (args . action )
216
218
invoke_swiftpm (
217
219
package_path = args .package_path ,
218
220
swift_exec = args .swift_exec ,
@@ -233,7 +235,7 @@ def install(args: argparse.Namespace) -> None:
233
235
234
236
print ("** Installing swift-format **" )
235
237
236
- env = get_swiftpm_environment_variables ()
238
+ env = get_swiftpm_environment_variables (args . action )
237
239
swiftpm_args = get_swiftpm_options (
238
240
swift_exec = args .swift_exec ,
239
241
package_path = args .package_path ,
0 commit comments