Skip to content

Commit b65407d

Browse files
committed
Tweak Ark init now that source() requires initialized harp
1 parent 28200d1 commit b65407d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/ark/src/interface.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,17 @@ pub fn start_r(
184184
libraries.initialize_post_setup_r();
185185

186186
unsafe {
187-
// Optionally run a user specified R startup script
188-
if let Some(file) = &startup_file {
189-
r_source(file).or_log_error(&format!("Failed to source startup file '{file}' due to"));
190-
}
191-
192187
// Register embedded routines
193188
r_register_routines();
194189

195190
// Initialize harp (after routine registration)
196191
harp::initialize();
197192

193+
// Optionally run a user specified R startup script (after harp init)
194+
if let Some(file) = &startup_file {
195+
r_source(file).or_log_error(&format!("Failed to source startup file '{file}' due to"));
196+
}
197+
198198
// Initialize support functions (after routine registration)
199199
if let Err(err) = modules::initialize(false) {
200200
log::error!("Can't load R modules: {err:?}");

0 commit comments

Comments
 (0)