Skip to content

Commit f6fb45d

Browse files
committed
To avoid using T.unsafe, Convert experiments hash to have string keys and string values to match the expected format.
1 parent 31cf828 commit f6fb45d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

updater/lib/dependabot/file_fetcher_command.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ def create_file_fetcher(directory: nil)
9999
# prefer credentials directly from the root of the file (will contain secrets) but if not specified, fall back to
100100
# the job's credentials-metadata that has no secrets
101101
credentials = job_definition.fetch("credentials", job_credentials_metadata)
102-
102+
# Convert experiments hash to have string keys and string values to match the expected format
103+
# for the file fetcher. This is necessary because the file fetcher expects options to be in string format.
103104
args = {
104105
source: job.source.clone.tap { |s| s.directory = directory_to_use },
105106
credentials: credentials,
106-
options: T.unsafe(job.experiments)
107+
options: job.experiments.transform_keys(&:to_s).transform_values(&:to_s)
107108
}
108109
args[:repo_contents_path] = Environment.repo_contents_path if job.clone? || already_cloned?
109110
Dependabot::FileFetchers.for_package_manager(job.package_manager).new(**args)

0 commit comments

Comments
 (0)