Skip to content

Commit aff1d85

Browse files
hoffaaahung
andauthored
fix(sam-translate.py): add samtranslator to path (#2875)
Co-authored-by: _sam <[email protected]>
1 parent afc68ac commit aff1d85

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/sam-translate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import argparse
88
import json
99
import logging
10+
import os
1011
import platform
1112
import subprocess
1213
import sys
@@ -15,6 +16,10 @@
1516

1617
import boto3
1718

19+
# To allow this script to be executed from other directories
20+
my_path = os.path.dirname(os.path.abspath(__file__))
21+
sys.path.insert(0, my_path + "/..")
22+
1823
from samtranslator.model.exceptions import InvalidDocumentException
1924
from samtranslator.public.translator import ManagedPolicyLoader
2025
from samtranslator.translator.transform import transform

0 commit comments

Comments
 (0)