exercise creates an exercise using one of the submitted filepaths. This assumes prior verification that submit paths belong to the same exercise.
(aSubmitPath string)
| 190 | // exercise creates an exercise using one of the submitted filepaths. |
| 191 | // This assumes prior verification that submit paths belong to the same exercise. |
| 192 | func (s *submitCmdContext) exercise(aSubmitPath string) (workspace.Exercise, error) { |
| 193 | ws, err := workspace.New(s.usrCfg.GetString("workspace")) |
| 194 | if err != nil { |
| 195 | return workspace.Exercise{}, err |
| 196 | } |
| 197 | |
| 198 | dir, err := ws.ExerciseDir(aSubmitPath) |
| 199 | if err != nil { |
| 200 | return workspace.Exercise{}, err |
| 201 | } |
| 202 | return workspace.NewExerciseFromDir(dir), nil |
| 203 | } |
| 204 | |
| 205 | func (s *submitCmdContext) migrateLegacyMetadata(exercise workspace.Exercise) error { |
| 206 | migrationStatus, err := exercise.MigrateLegacyMetadataFile() |
no test coverage detected