Skip to content

Commit 3556e8c

Browse files
committed
Revert changes to run.py
1 parent 5643df4 commit 3556e8c

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

src/datacustomcode/cli.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,6 @@ def run(
329329
):
330330
from datacustomcode.run import run_entrypoint
331331

332-
base_directory = find_base_directory(entrypoint)
333-
package_type = get_package_type(base_directory)
334-
335332
run_entrypoint(
336-
entrypoint,
337-
config_file,
338-
dependencies,
339-
profile,
340-
package_type=package_type,
341-
sf_cli_org=sf_cli_org,
333+
entrypoint, config_file, dependencies, profile, sf_cli_org=sf_cli_org
342334
)

src/datacustomcode/run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
)
2626

2727
from datacustomcode.config import config
28+
from datacustomcode.scan import get_package_type
2829

2930

3031
def _set_config_option(config_obj, key: str, value: str) -> None:
@@ -44,7 +45,6 @@ def run_entrypoint(
4445
config_file: Union[str, None],
4546
dependencies: List[str],
4647
profile: str,
47-
package_type: str = "script",
4848
sf_cli_org: Optional[str] = None,
4949
) -> None:
5050
"""Run the entrypoint script with the given config and dependencies.
@@ -54,7 +54,6 @@ def run_entrypoint(
5454
config_file: The config file to use.
5555
dependencies: The dependencies to import.
5656
profile: The credentials profile to use.
57-
package_type: The code type ("script" or "function").
5857
sf_cli_org: Optional SF CLI org alias or username. If provided, credentials
5958
are fetched via `sf org display` instead of from credentials.ini.
6059
"""
@@ -69,6 +68,8 @@ def run_entrypoint(
6968
f"config.json not found at {config_json_path}. config.json is required."
7069
)
7170

71+
package_type = get_package_type(entrypoint_dir)
72+
7273
try:
7374
with open(config_json_path, "r") as f:
7475
config_json = json.load(f)

0 commit comments

Comments
 (0)