@@ -11,11 +11,11 @@ public static class WebDriverManager
1111 {
1212 private static readonly Logger HLog = LogManager . GetCurrentClassLogger ( ) ;
1313
14- private static string DesticationFolder { get ; set ; }
14+ private static string DestinationFolder { get ; set ; }
1515
16- private static string DesticationZip { get ; set ; }
16+ private static string DestinationZip { get ; set ; }
1717
18- private static string DesticationFile { get ; set ; }
18+ private static string DestinationFile { get ; set ; }
1919
2020 private static string Zip { get ; set ; }
2121
@@ -94,14 +94,14 @@ public static void Download(WebDriverManagerConfig config)
9494 Zip = ZipFileName ( url ) ;
9595 var bin = Path . GetFileNameWithoutExtension ( config . Binary ) ;
9696 if ( bin != null )
97- DesticationFolder = Path . Combine ( config . Destication , bin , config . Version , config . Architecture ) ;
98- DesticationZip = Path . Combine ( DesticationFolder , Zip ) ;
99- DesticationFile = Path . Combine ( DesticationFolder , config . Binary ) ;
97+ DestinationFolder = Path . Combine ( config . Destination , bin , config . Version , config . Architecture ) ;
98+ DestinationZip = Path . Combine ( DestinationFolder , Zip ) ;
99+ DestinationFile = Path . Combine ( DestinationFolder , config . Binary ) ;
100100 try
101101 {
102- if ( File . Exists ( DesticationFile ) ) return ;
103- PrepareCatalogs ( DesticationFolder ) ;
104- webClient . DownloadFile ( url , DesticationZip ) ;
102+ if ( File . Exists ( DestinationFile ) ) return ;
103+ PrepareCatalogs ( DestinationFolder ) ;
104+ webClient . DownloadFile ( url , DestinationZip ) ;
105105 }
106106 catch ( Exception ex )
107107 {
@@ -119,17 +119,17 @@ public static void Unzip(WebDriverManagerConfig config)
119119 {
120120 try
121121 {
122- DesticationFile = Path . Combine ( DesticationFolder , config . Binary ) ;
122+ DestinationFile = Path . Combine ( DestinationFolder , config . Binary ) ;
123123
124- if ( ! File . Exists ( DesticationFile ) )
124+ if ( ! File . Exists ( DestinationFile ) )
125125 {
126- using ( var zip = ZipFile . Open ( DesticationZip , ZipArchiveMode . Read ) )
126+ using ( var zip = ZipFile . Open ( DestinationZip , ZipArchiveMode . Read ) )
127127 {
128128 foreach ( var entry in zip . Entries )
129129 {
130130 if ( entry . Name == config . Binary )
131131 {
132- entry . ExtractToFile ( DesticationFile ) ;
132+ entry . ExtractToFile ( DestinationFile ) ;
133133 }
134134 }
135135 }
@@ -152,8 +152,8 @@ public static void Clean()
152152 {
153153 try
154154 {
155- if ( File . Exists ( DesticationZip ) )
156- File . Delete ( DesticationZip ) ;
155+ if ( File . Exists ( DestinationZip ) )
156+ File . Delete ( DestinationZip ) ;
157157 }
158158 catch ( Exception ex )
159159 {
@@ -172,8 +172,8 @@ public static void AddEnvironmentVariable(string variable)
172172 try
173173 {
174174 var variableValue = Environment . GetEnvironmentVariable ( variable ) ;
175- if ( variableValue == null || ! variableValue . Equals ( DesticationFolder ) )
176- Environment . SetEnvironmentVariable ( variable , DesticationFolder , EnvironmentVariableTarget . Machine ) ;
175+ if ( variableValue == null || ! variableValue . Equals ( DestinationFolder ) )
176+ Environment . SetEnvironmentVariable ( variable , DestinationFolder , EnvironmentVariableTarget . Machine ) ;
177177 }
178178 catch ( Exception ex )
179179 {
@@ -198,7 +198,7 @@ public static void UpdatePath(string variable, bool extendPath = false)
198198 var newPathVariable = pathVariable +
199199 ( pathVariable != null && pathVariable . EndsWith ( ";" ) ? string . Empty : ";" ) +
200200 $@ "%{ variable } %";
201- if ( pathVariable != null && ! pathVariable . Contains ( DesticationFolder ) &&
201+ if ( pathVariable != null && ! pathVariable . Contains ( DestinationFolder ) &&
202202 ! pathVariable . Contains ( variable ) )
203203 Environment . SetEnvironmentVariable ( newPathVariable , name , EnvironmentVariableTarget . Machine ) ;
204204 }
@@ -217,12 +217,12 @@ public static void Install(string command)
217217 {
218218 try
219219 {
220- if ( ! File . Exists ( DesticationFile ) || ! IsNew ) return ;
220+ if ( ! File . Exists ( DestinationFile ) || ! IsNew ) return ;
221221 var startInfo = new ProcessStartInfo
222222 {
223223 UseShellExecute = false ,
224224 WindowStyle = ProcessWindowStyle . Hidden ,
225- FileName = DesticationFile ,
225+ FileName = DestinationFile ,
226226 Arguments = command
227227 } ;
228228 var process = new Process
@@ -236,11 +236,11 @@ public static void Install(string command)
236236 {
237237 HLog . Error ( ex ,
238238 "Error occurred during application installation " +
239- $ "from file '{ DesticationFile } ' " +
239+ $ "from file '{ DestinationFile } ' " +
240240 $ "using command '{ command } '") ;
241241 throw new WebDriverManagerException (
242242 "Error occurred during application installation " +
243- $ "from file '{ DesticationFile } ' " +
243+ $ "from file '{ DestinationFile } ' " +
244244 $ "using command '{ command } '",
245245 ex ) ;
246246 }
0 commit comments